SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2006
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    saving html page

    Here is what I am trying to do...

    I want to be able to automatically generate HTML pages based on information stored in a MySQL database.

    I know how to generate the page, but I am confused on how to get it to automatically save so it can be found.

    I know this isn't the clearest way to explain this, but I am rather confused on how to do it.

    Any Help is greatly appreciated.

  2. #2
    Visible Ninja bronze trophy
    JeffWalden's Avatar
    Join Date
    Sep 2002
    Location
    Los Angeles
    Posts
    1,709
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    The page is generally not generated from the database and then saved as static HTML. With most database driven websites your page will be generated dynamically every time a user visits.

    If you haven't read it yet, take a look at Kevin Yank's tutorial. http://articles.sitepoint.com/articl...mysql-tutorial
    TAKE A WALK OUTSIDE YOUR MIND.

  3. #3
    SitePoint Enthusiast
    Join Date
    Feb 2004
    Location
    France
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To put it another way: what looks like "page" from the browser is actually a program calling a database and sending the data in HTML. The HTML is generated again everytime someone loads the "page".

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    //start of script
    ob_start();

    //...code...

    //end of script
    file_put_contents('foo.html'ob_get_contents()); 

  5. #5
    SitePoint Zealot
    Join Date
    Jul 2006
    Posts
    112
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks all for the help... that helped a lot.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •