Hi there,
I was wondering if there's a way to generate simple HTML files localy from php files. I realize that the server does this when it parses my php files...but can I somehow dump that to a file on my drive...??
I have a web server at home that supports php so I develop using php
but if I'm building a site on a server that does not support php I would like to be able to create the entire site using php with templates and then generating all the HTLM files I need to upload to the non-php server.
What is the simplest way to do this?
thanks
Pabs
html generator
Moderator: General Moderators
- dull1554
- Forum Regular
- Posts: 680
- Joined: Sat Nov 22, 2003 11:26 am
- Location: 42:21:35.359N, 76:02:20.688W
i don't know what it is that you want to write to a file, but all you have to do is, like if your gonna pull it in from a form, just define it as a $var and where you see $insertcode thats where you would place what ever you want written to the file, weither its text, html, or a $var
$fp = fopen("somefile.html", "w");
$insertcode = "//the code you would want to use";
fwrite($fp, $insertcode);
fclose($fp);
$fp = fopen("somefile.html", "w");
$insertcode = "//the code you would want to use";
fwrite($fp, $insertcode);
fclose($fp);
not sure if we are on the same page...
What I want to do is create a template using php..
make the entire site using php..then once I have everything ready generate the corresponding HTML files for the pages on the site.
Like I said, the site in question does not support php so I need to dump the parsed php files to corresponding HTML files...
thanks
Pabs
What I want to do is create a template using php..
make the entire site using php..then once I have everything ready generate the corresponding HTML files for the pages on the site.
Like I said, the site in question does not support php so I need to dump the parsed php files to corresponding HTML files...
thanks
Pabs