Page 1 of 1

Is there a way to support virtual php file?

Posted: Mon Dec 06, 2010 7:06 pm
by wyx2000
For example, I have php files stored in a MySQL db, is there a way I can make it compiled ny PHP and output?

thanks

Re: Is there a way to support virtual php file?

Posted: Mon Dec 06, 2010 8:47 pm
by Christopher
You could save the output of a PHP script (see output buffering in the manual) and use a database to cache it. Usually filesystems are faster so they are used for that kind of cache, but a database would work as well.

Re: Is there a way to support virtual php file?

Posted: Tue Dec 07, 2010 6:43 am
by jarofgreen
http://php.net/manual/en/function.eval.php
Evaluates the string given in code_str as PHP code. Among other things, this can be useful for storing code in a database text field for later execution.