[thelist] How to implement static page generator?

**1st Vamp** wes at pmason.karoo.co.uk
Fri Mar 8 11:20:01 CST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: MD5

Everyone elses reply on this topic are good pieces of advice, but
thought I'd add one thing when it comes to PHP.
An easy way of caching the HTML output of the system would be to turn
on output buffering in PHP (ob section of the manual, ob_start(); to
begin buffering), then echo the HTML to the buffer and assign the
contents of the buffer to a variable with $var = ob_get_contents();
clear it with ob_clear(); and stop buffering with ob_end();
Or you might be able to use ob_end_cear(); to both at the same time,
but I can't remember whether this is available outside the CVS for PHP
4.2.

- - Vamp

Friday, March 08, 2002, 12:59:12 PM, Lachlan Cannon wrote:

> Hi all,

> I'm planning on writing my own blog script in php, which I
> want to generate static pages (less load on server - it
> probably doesn't matter, but I want it to be cleaner for
> the point of it being cleaner). Basically, I want the admin
> program to generate the html pages, and write it out, and
> retire them into an archives folder once the month is over.
> However I'm facing a few problems planning how it will
> work.

-----BEGIN PGP SIGNATURE-----
Version: 2.6

iQIMAwUAPIjyn+tR7En81eJTAQHEEQ+4vDzaRie7cvBWo/OVwSCL6awz1SDL/dgx
qEgJ8ieYN8Rs2rthLRNMjOk/E5qhUU8AmM4cI+pxh94fUu9021LXOcNhNxSptnNP
aVg/SYC+IuFm4n1881Tmytt+cDoAbyvHyz0Kt8TnzMHtID98nT/2g0p0WRcB7Li0
kHiw/41uMUMgehdf2ChbtBPnx4dSJYpDofTNc4KhdtqGoiMazVrPEdtbtlrEzUo3
tYP4O5ZTSHsDnHofPofRubUkF6SnmNo4VPHYbMelICYLQWJl2rQbelb75kWp7SPS
ueo1M+TJ0wDRrKf8ZDL2CXauIJiSqgWNhHL4MHXc/TAQx5cgMsi+ngXMzWT3zive
ssRnglIQ+nhu+Dvo107mTKRxBlVjDxCt+MHDhLJlpx/ESnEQKPHZbq4SbDwREa68
Z/+NGaueVE4vfcowLPaGjN3aW6RW4dwYt0rCueHuwjZlhM6pg1aCgaJ+IfWOkJfl
0vPDi4sHQVtqTcHFHeFZwoGQkMZQ1Q9cBWHJqSISGlJFN5ydvmKKp9nVYTEiPtc3
RbxQ6HA8MR2uas7/hgg/tQKAqY0yjVlOmVurS9SYArudcYJ6c4VejqujeDhvq5op
Be9KN/AEJ4zDEeeXedjseEY0hR6jLR5km0g9iqENar06nKgFEmqOOKvRwNdttog=
=iA7P
-----END PGP SIGNATURE-----




More information about the thelist mailing list