Hi, i was wondering if someone could point me in the right direction in the following situation:

I currently have a site up using PHP to dynamically generate content from a MySQL database.

What I would like to do is write a script in PHP that would output the contents of my site into HTML files(mainting the linking to the different pages).

Any idea what i need to do?

thanks a lot,
manuel

    1) The php pages dynamically generate content.
    2) You want static HTML files.

    I don't understand how you could create static HTML files that do the same thing as dynamic php files.

      I think calavera wants cached pages on the server. These pages can be updated when some script is run.

      Well, you can output everything to an .html file using functions like [man]fwrite[/man]. For example, if you have a page for A's, B's, C, etc....

      You can do a query for each letter and output to the appropiate file. Is this what you're looking for?

        I use a similar technology to generate common files.

        All the content I would echo to the screen, I put in a variable and write to a file.

        If you have wrappers, you can do something along the lines of...

        $myfile = file('http://mysite.url/to/myfile.php');
        $fp = fopen('myfile.html','w');
        fwrite($fp, implode('\n',$myfile));
        fclose($fp);

        TiA

        Michael

          Write a Reply...