note 15647 added to function.require

From: Date: Tue, 25 Sep 2001 05:19:34 +0000
Subject: note 15647 added to function.require
Groups: php.notes 
Request: Send a blank email to php-notes+get-18265@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 -- http://www.php.net/manual/en/function.require.php http://master.php.net/manage/user-notes.php?action=edit+15647 http://master.php.net/manage/user-notes.php?action=delete+15647 http://master.php.net/manage/user-notes.php?action=reject+15647

« previous php.notes (#18265) next »