Having probs here.
I need to write the output of a PHP script to an HTML page to then be processed by DOMPDF so I can make a nice little PDF for some friends to use.
When I use file_get_contents to get the contents of a “donor” PHP script, it does that – literally. It grabs the unevaluated PHP and holds it for me to do as I wish.
I need the PHP script to RUN, then take the output and file_put_contents it somewhere.
Thanks,
Rob
Well, ideally you can configure the PHP script so that instead of writing its contents it builds a giant string and returns it. That way you can simply call a function and get back a string with the information you need.
If the target script is out of your control, you might work around it with something like: