Re: Including Files

From: Date: Wed, 03 Apr 2002 14:43:08 +0000
Subject: Re: Including Files
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-91308@lists.php.net to get a copy of this message
try this: if(!@include('file.php')) { header("HTTP/1.0 404 Not Found"); } change header() into whatever you want to include at it's place. Careful with this though, make sure that the files script is trying to include do never get below a certain directory. Otherwise I can dispay myself your /etc/passwd and you're freaked :-) Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) www.PHPBeginner.com maxim@ phpbeginner.com Craig Donnelly writes:
Is there a way to setup either the apache/php directives to produce a custom 404 if an include file "fails to be included" ?? Or is this a job for .HTACCESS?? Regards, ~Craig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#91308) next »