I'm having a problem with the following php code:
Code
<?php
$file = fopen("res/changelog","r");
while(! feof($file))
{
$line = fgets($file);
if (strlen($line) > 0){
if (substr($line, 0, 1) === "#"){
echo "<h2>", substr($line, 1), "</h2><br />"
}
else {
echo "<p>", $line, "</p><br />";
}
}
}
fclose($file);
?>
What I'm trying to achieve is to parse text from a file and transform it into HTML elements using php. For some reason, when I try to load the page, it's white.
Can anyone tell me the possible cause of the issue and how to fix it? Thank you in advance