Two includes themselves would not be a noticeable difference but the code within them may cause the issue. What is being done within each including – fetching remote content perhaps?

Todd_Temple
—
2011-02-09T18:54:31Z —
#3

Not really fetching remote content... I don't guess. It is simply loading a menu or navigation for each.

I am on the phone with the web hosting provider and they commented that I should not have absolute URLs in my include files and that I should change them to relative URLs. Would that help? That doesn't sound correct...

logic_earth
—
2011-02-09T19:40:19Z —
#4

I hope you are not doing this: include 'http://domain.com/page...';

Todd_Temple
—
2011-02-09T19:51:27Z —
#5

logic_earth said:

I hope you are not doing this: include 'http://domain.com/page...';

Why, yes I am. Is this bad news?

logic_earth
—
2011-02-09T19:54:31Z —
#6

It is very bad. You are making PHP go out to the internet, it needs to connect to a DNS server to get the IP, then send out network request to establish a connection to the server, download the requested file...etc.

Use file paths (like you do for files on your computer), not URLs to access files with PHP.

Todd_Temple
—
2011-02-09T19:57:40Z —
#7

logic_earth said:

It is very bad. You are making PHP go out to the internet, it needs to connect to a DNS server to get the IP, then send out network request to establish a connection to the server, download the requested file...etc.

Use file paths (like you do for files on your computer), not URLs to access files with PHP.

Okay. Thanks for the info.

Michael_Morris1
—
2011-02-09T20:38:14Z —
#8

Whoever thought allowing web URL's to be used with include and require should be shot. :nono:

cranial_bore
—
2011-02-09T21:17:36Z —
#9

It also makes your code hard to move between local dev server and production one if all the absolute URLs are hard coded.

Michael_Morris1
—
2011-02-09T21:43:20Z —
#10

Yeah, but honestly it was just an awesomely stupid idea, right up there with register globals and magic quotes. PHP is a good language, but damn if it doesn't have some terrible mistakes in its past.