note 15647 rejected from function.require by jimw

From: Date: Tue, 25 Sep 2001 05:23:55 +0000
Subject: note 15647 rejected from function.require by jimw
Groups: php.notes 
Request: Send a blank email to php-notes+get-18266@lists.php.net to get a copy of this message
Hi, I'd like to test if a inlcude file exists - I've used " $file = file_exists($productLocation.'/'.$productRequested.'.php');" with great success, but do to my new hosting provider, I can only access my include files outside of the document root. So I can no longer test if it exist thru file_exist. I've tried assigning a variable to the require function to see if it would pass false if the file did not exist. But I just get a fatal warning when it does not exist and it prints out twice the require file if the file does exist! Is there any way to test if a file exist outside the documentRoot? Thanks, Alex

« previous php.notes (#18266) next »