[Xitami] fresh php pages

Trent Reimer xitami@lists.xitami.org
Thu, 6 Jun 2002 12:25:56 -0700


This is coming well after the subject was introduced but Melle gave me a
good idea for using PHP with Xitami and I found a way to automate it.

The problem I was having was when the data a php file was changing, if the
php file itself was not modified the browser would not request a "fresh"
copy and would still see the old info. But there's an easy work around in
the php.ini file.

There's a section that looks like this:

 auto_prepend_file =
 auto_append_file =

where any file you specify can be tacked onto every page. So I put this:

<?php

// this is a prepend which doesn't allow the browser to cache PHP content

header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);

header("Pragma:no-cache"); // for http 1.0 browsers

?>

into a file called "prepend.php" and changed the php.ini to

auto_prepend_file = prepend.php


now I get the fresh info every call. Thanks to everyone who helped me on
this one.

Trent