Forum Moderators: coopster

Message Too Old, No Replies

Pages loading slowly with PHP includes

         

The Literary Thug

2:00 am on Aug 5, 2003 (gmt 0)

10+ Year Member



Hello all,

I decided to write my menu header and footer as .txt files and include them with PHP commands. As of right now, this is the only PHP on the page, though I'm planning to do some stuff with a database later. The total page size is under 5k .

The problem is the PHP page takes several seconds to load (I tried a regular .htm page with all the same information and it loads quickly). Is there anything I can do to reduce this time?

thank you!

jatar_k

2:38 am on Aug 5, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



includes are very fast so it does make me think that there is some other factor that is slowing down the page.

Is it just a straight include and nothing else?

vincevincevince

7:24 am on Aug 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



is the include coming from a local path, or have you got an http path?

include("header.txt");
vs.
include("http:*//example.foo/header.txt");

in the latter case it could well be unexpectedly slow

finally, maybe php is overloaded - is it on a shared virtual host?