--- [EMAIL PROTECTED] wrote: > Hello all, > I have been writing a simple CMS and have now just realised > that I may have made one very bad assumption. I have assumed PHP has a > function similar to Javascript's eval(). > > I am loading files with file_get_content and searching the string for tags > that indicate other files to be inserted into the original file (as a > string). > > In other words everything is done in RAM as a string. Some of the loaded > files are PHP and some of these PHP files will contain the CMS tags within > HTML in the same PHP file. > > At some stage I will need to parse the resulting string for PHP. Either by > parsing the total resulting string or by parsing files that are included > with CMS tag and end in PHP. > > Is there a way in PHP to parse a PHP file into a string or to parse a string > containing PHP? > > Thanks, Rob M.
It does (http://php.net/eval) but use extreme caution since this could be abused very easily with some nasty results. James
