Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run PHP in memory

As I can't write file on the GAE server, is there a way that I can directly run PHP code in memory without the help of a php file. BTW, I was using Quercus to run PHP in GAE.
You can refer to the link: http://www.webdigi.co.uk/blog/2009/run-php-on-the-google-app-engine/
Thank you so much.

like image 751
wgx731 Avatar asked Jul 25 '26 05:07

wgx731


1 Answers

You can use eval() from PHP to execute a string of PHP code without saving it to a file.

For example:

eval('echo hi;'); // this echoes "hi"
like image 97
lunixbochs Avatar answered Jul 26 '26 19:07

lunixbochs



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!