I have a unique situation where I need to be able to request a file (a template of my site actually), read it from <body> to <!-- ### ---> (non-inclusive), prase the PHP in between there, and display the results. After I do that I'll need to do the opposite: <!--- ### ---> to </body>
My first attempt at this gives me the straight code not parsed as PHP (the page I will be displaying this on, Miva shopping cart software, will not render PHP). I tried to use fopen and fgets.
Is there a better solution to this? I would like to avoid having to manually split the two files in half and including them that way, but if I do it that way, it will work. The problem with that is if I make changes to the template for my other pages, I have to manually copy the changes over to the second template pages.
Read half a file, parse PHP and display results
No replies to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users