note 52913 added to function.include
| From: | php-general at lists dot php dot net | Date: | Tue, 17 May 2005 15:10:56 +0000 |
| Subject: | note 52913 added to function.include | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-89551@lists.php.net to get a copy of this message | ||
Thought you can figure it out by reading the doc, this hint might save you some time. If you
override include_path, be sure to include the current directory ( . ) in the path list, otherwise
include("includes/a.php") will not search in the current script directory.
e.g :
if(file_exists("includes/a.php"))
include("includes/a.php")
The first line will test to true, however include will not find the file, and you'll get a
"failed to open stream" error
----
Manual Page -- http://www.php.net/manual/en/function.include.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+52913
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52913&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52913&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52913&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52913&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52913&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+52913&report=yes
Search -- http://master.php.net/manage/user-notes.php