On 1/26/2010 6:08 PM, clancy_1@xxxxxxxxxxxx wrote:
In principle this is extremely simple. Take your existing procedure to generate the page
then:
1. $page = '';
2. Replace every echo 'whatever'; statement with $page .= 'whatever';, and every<html>
with $page .= '<html>';
3. file_put_contents($page,$file) // The manual is down (again!) and I have forgotten the
format.
4. echo( file_get_contents($file)); // to generate the PHP page.
However I strongly suspect that it is possible to simply redirect all the 'echo's in your
existing procedure to write to $page (or $file?), without changing the code at all. Is
this so?
Thanks Clancy for the details - much appreciated,
Actually I would like to use BOTH techniques. If it's possible to take
an exsisting page and just save that (without all the rewriting ) that
would also be great...
As an example, say you had a details master dynamic php page to display
let's say a product (pulled from the database from url ID=334 or whatever)
If I also wanted to create a STATIC .html page from that for just this
one product - it would be great to be able to this too.
Part of the reason for this is as Ashley mentioned: SEO
Another thing I'm trying to do is create some admin pages - where a user
can type in some text and choices - and hard coded .html pages go on the
site.
Thanks for the help
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php