Re: HTML file to a $var: Pls Help
| From: | eNetwizard Development Team | Date: | Sat, 26 Oct 2002 03:08:16 +0000 |
| Subject: | Re: HTML file to a $var: Pls Help | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-121508@lists.php.net to get a copy of this message | ||
There is another way to do this also...
ob_start();
readfile($file);
$var = ob_get_contents();
ob_end_clean();
If you want to parse the file before inputting it into the variable,
instead of using readfile() use something like:
eval("require(\"".$file."\");");
==================================================
eNetwizard Network
http://www.enetwizard.net/default.ehtml
==================================================
eNetwizard Content Management Server
http://project.enetwizard.net/cmserver.ehtml
==================================================
eNetwizard Managed Hosting Services
http://hosting.enetwizard.net/hosting.ehtml
==================================================