try replacing your include with the full data path to the header file rather than a 
URL, php has to establish a http connect and download your header file before 

require ("/path/to/file/header.htm")

sometimes depending on what web server software you are using, you may need to do it 
like this

require ("./path/to/file/header.htm")

note the "." in front of the path
Rance Hall
Internal Office Extensions: 2455 or 6655
PC Programmer, The Buckle, Inc.

-----Original Message-----
From: anti-blank [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 3:38 PM
Subject: [PHP] Really slow include

I have a header section for my website and I'd like to include it into each page.  
Since this is where
I'm housing all of my navagation.  Here is my problem though.  I have the header 
tables sitting in a page
header.htm.  I'm calling it as so:
require ("header.htm")

This works fine as long as I stay in the main folder /htdocs where the header.htm file 
The problem lies when I go any deeper.  I tried replacing the link with:
require ("/header.htm")
Hoping that would put it back to the /htdocs folder as it works for my standard links. 
I get this:
Fatal error: Failed opening required '/header.htm' 
(include_path='.:/usr/local/lib/php') in /www/foo/htdocs/foo/index_test.php on line 82

I've tried correcting it by including the full path: 
require ("";)

This does work but it's so amazingly slow.  Even on my cable connection it will take 
20-30 seconds
to load this.  I've switched back and forth between require and include with no change 
in speed.  Anyone
have a suggestion or an idea on why my load time is suffering so much?

I hope all of that was clear enough.


PHP General Mailing List (
To unsubscribe, visit:

Reply via email to