Re: Static constants? Server persistent?

From: Date: Sun, 29 Sep 2002 17:13:09 +0000
Subject: Re: Static constants? Server persistent?
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-118084@lists.php.net to get a copy of this message
Jean-Christian Imbeault wrote:
Mike Mannakee wrote:
Just out of curiosity, what problem are you trying to solve? Including a file is so easy and takes so little time I wonder how this could be a problem.
Good question, glad you asked. I have a header on all my pages. The header is HTML and contains
images.    So of course I do an include("header.html") on all my pages ...
The header is about 20K, having PHP read 20k off the disk everytime a user visits my page seemed inneficient. So I was trying to find a way to get PHP to cache the file in memory so it wouldn't have to read it off disk all the time ... I have lots of bandwidth but not enough money to pay for a proper SCSI/RAID disk set. All I have is a poor 7,2000 IDE HD. So the less disk seeks thebetter :) Jc If you are running under Linux.. load it up with RAM... the OS will hold any recent disk reads in cache... particularly a simple html document with a few locally held images. I've watched disk access on some of my boxes, some sites serving 1gig per day, and the disk just barely blips along... most being served from cache. Linux rules!
John Hinton

« previous php.general (#118084) next »