I am loading HTML/PHP code from an external textfile with
$f = fopen($filename, "r");
while ($line = fgets($f, 4096))
{
print $line;
}
Is there a way to have the server parse the PHP code that is in this file? I am currently only using a simple <?php echo("test"); ?> in the external file (held in $filename) to test if it works. I tried using ob_start() and ob_end_flush() in the main file, but to no avail. I am open to other solutions, but if possible, I'd like to maintain the separation of the files and use only PHP to ease future upgrades to the website.
include, then!