|
Posted by Erwin Moller on 02/08/07 09:43
Mitesh wrote:
> I have an HTML page with references to PHP variables. This HTML is
> included from another PHP page. How can I save the HTML page
> dynamically i.e. when all the PHP variables are written into the HTML
> page.
>
> Thanx in Advance
Hi,
Probably the easiest way:
When creating the file that contains the values of PHP:
1) start outputbuffering above your page: ob_start()
2) Just output all you want, using your PHP variables to produce the output
3) At the end of the script, get the content of the buffer, and write that
to the file you want to include elsewhere.
If you have to do this for many pages (eg: all is dynamic), and have to
automate the process: have a look at CURL. Curl can call another PHP script
with POST or GET parameters given by you (eg the filename, other vars that
are used to produce the output, etc)
Hope that helps
Regards,
Erwin Moller
Navigation:
[Reply to this message]
|