NYCPHP Meetup

[nycphp-talk] Minimal overhead

Paul Houle paul at devonianfarm.com
Sun Sep 2 13:02:31 EDT 2007


Josh McCormack wrote:
> You could get around having to have all pages be php by running
> through some sort of preprocessos that makes static pages for that
> audience, day, hour, etc, and flags which files really need to be
> dynamic. Sounds like a lot of work, though.
>
> Josh
>   
    I'm currently building an ultralight publishing system to preserve 
an old database-backed site that got trashed a year or two ago.

    I don't have any intention of adding new articles,  so I don't need 
a live database.  I wrote a script that read rows from the database and 
wrote them into ".html" files that look like

<?php

$post_data=array(
    "SID" => "20070202304034",
    "TITLE" => "The title of this post"
    ...
);

    I'm just about to use "auto_prepend_file" configuration directive to 
run another PHP file that renders the page based on the contents of 
$post_data.

    I expect to get excellent performance this way,  but still have the 
flexibility of changing the way files are rendered without having to go 
back to the database.



More information about the talk mailing list