| re: I need to create html files from php files using php
Thanks for your response.
It is only a few include files that I want to turn static each time
their content changes, perhaps a couple of times a week, but each of
these pages makes database calls, so if I leave them dynamic the
system will be repeatedly making demands on the database for every
page on my site as some of these includes are in the header.
I need to be able to do this from within a php page rather than from
the command line, so Pedro's solution seems to fit.
Dennis
Anonymous <anonymous@nowhere.invalid> wrote in message news:<417D8A0B.F9ACC726@nowhere.invalid>...[color=blue]
> Dennis wrote:
>[color=green]
> > I am now converting the site to PHP as I want to use mod_rewrite, what
> > I need is a routine that I can pass a php file to and end up with an
> > HTML version.[/color]
>
> I don't know a routine but a program that does what you want. It's
> called php.exe. ;-)
>
> php.exe -q filename.php > filename.html
>
> This command will create the HTML page which the script would create
> when it is run on a server. But that would make the page static.
>
> The whole point of server side scripting is to have dynamic pages that
> can change with user input, database content, etc., so I don't think
> making your pages static is a really good idea. Except if the server is
> heavily accessed and the content of your pages don't change too often.
> Then making everything static might make sense to reduce server load.
>
> Bye![/color] |