This seems like it should be an obvious, quick solution, but that's not turning out to be the case.
I have a local file that does some database work and outputs HTML, let's call this file1
. I have another file that needs to use some of this information, but shouldn't need to generate it itself, file2
.
My plan was to just pull the pre-parsed PHP (at this point HTML) into file2
, but it's pulling PHP code instead. This could obviously be handled with eval()
, but I'd rather not. Something along the lines of wget()
might do the trick, but I'd rather not run command line from my PHP script either if possible.
Is there a solution while avoiding the two options above or do I have to just bite the bullet and use one of them?
Quick Clarification: The entirety of file1
is not used. file2
chops out the parts it needs so simply outputting all resulting HTML from file1
is not viable.