PDA

View Full Version : include header and footer.php



searchy
07-26-2005, 01:20 PM
Hi ,

I saw this other topic

http://www.dev-forums.com/index.php?showtopic=175

but i'd like to use

<?php require("http://www.domain.com/header.php");?>

whois script

<?php require("http://www.domain.com/footer");?>


I tried adding appropriately [as i saw it] to templates and whois.php but without luck

Patrick
07-26-2005, 04:08 PM
Please realize that you should NEVER include a page with its full URL, as this causes extra strain on the server that just isn't needed. Additionally, it causes the server to download itself, which is strange.

Use absolute paths. Research them if you do not know what they are (basically, an absolute path is simply the file system path (/path/to/file if linux or C:\path\to\file if windows) instead of the webserver path.

Ask your webhost for more information.

searchy
07-26-2005, 04:11 PM
Please realize that you should NEVER include a page with its full URL, as this causes extra strain on the server that just isn't needed. Additionally, it causes the server to download itself, which is strange.

Use absolute paths. Research them if you do not know what they are (basically, an absolute path is simply the file system path (/path/to/file if linux or C:\path\to\file if windows) instead of the webserver path.

Ask your webhost for more information.


!!! - thx for that - i've been using full path includes all over the place. Once when I tried it somewhere I got this error message which I saved cos it was so wierd

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 2949120 bytes) in http://www.idomain.com/include.php on line 91346

- guess that explains it!

searchy
07-26-2005, 06:04 PM
Your excellent script taught me what the abs path was with auto-detect. thx again.