Note Submitter: holger at doessing dot net
Reason: bad code
----
This is a variation on Dale's code, however, this will allow
you to parse php within any type of file - yes, I actually
found a use for this ;)
<?php
flush(); // send/empty current buffer (however, see
ob_flush() if you experience problems)
ob_start(); // start recording
eval("?>".file_get_contents("stuff.foo&quo
t;)); // break out from php mode, but evaluate any php code
present in the file
$stuff = ob_get_contents(); // grab output buffer and treat
as string
ob_end_clean(); // discard buffer and stop buffering
?>
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|