[ Date Index ][
Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]
Re: [LUG] PHP to HTML
On Tuesday 16 Dec 2003 6:34 pm, Gemma Peter wrote:
> Is there any way of turning a load of PHP files into the output they end up
> as when they are processed by the web server (without opening them
> individually in a web browser and then saving them to disk)
This should be relatively simple.
All you need to do is make the scripts executable, then execute each one on
the command line and direct the output to the new html file. e.g.
./script123.php > script123.html
You can automate this using a Perl, Bash or even PHP script to do:
foreach file in directory do
./$filename.php > $filename.html
I know this is quite easy to do with Perl. I'm sure someone with a better
knowledge of Perl than me can give you some further help.
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.