Thread: Blank Page =(
View Single Post
Old 03-08-2008, 09:39 AM   #2 (permalink)
SOCK
The Acquainted
 
Join Date: Nov 2007
Posts: 154
Thanks: 31
SOCK is on a distinguished road
Default

If when you say the file you're including is "external", meaning it's a URL, then yes. Check for the 'allow_url_fopen' and 'allow_url_include' settings on that host. See the PHP manual entry for using remote files.

If you have no control over the matter, you might look at using readfile() or the cURL extension.

I also recommend you get into the habit of using require_once() rather than include in almost every case. Why? Because the include_once() or require_once() functions ensure that each file is only included once, so no recursion, and the require_once() (or require()) adds the benefit of killing the script if the file isn't included.

Using the '@' error suppression symbol at the beginning of include() is a bit redundant - depending on your error_reporting setting, it will usually fail silently every time.
__________________
I reject your reality, and substitute my own.
SOCK is offline  
Reply With Quote
The Following User Says Thank You to SOCK For This Useful Post:
obolus (03-08-2008)