Is there a way to support virtual php file?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
wyx2000
Forum Newbie
Posts: 1
Joined: Mon Dec 06, 2010 7:03 pm

Is there a way to support virtual php file?

Post 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
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

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

Post 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.
(#10850)
jarofgreen
Forum Commoner
Posts: 71
Joined: Sun Jul 11, 2010 12:40 pm

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

Post 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.
Post Reply