do not get <, > ,/ in php array loading a html ou javascript file
Hello
I cannot not get <, > ,/ in php array loading a html ou javascript file.
when I make the print_r($contents), do not get blank cells for the tags example (<script>)
==
<?php
foreach (glob("*.js") as $filename) {
$file = $filename;
$contents = file($file);
print_r($contents);
# $string = implode($contents);
$string = implode("<br>", $contents);
# echo $string;
echo "<br></br>";
}
?>
==
js code
==
<!DOCTYPE html>
<html>
<body>
<p>Click the button to wait 3 seconds, then alert "Hello".</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction()
{
setTimeout(function(){alert("Hello")},3000);
}
</script>
</body>
</html>
==
result: blank array
Can you please help me?
Thanking you in advance.
|