note 77519 added to function.set-include-path
| From: | (php@ideacode.com) | Date: | Sun, 02 Sep 2007 00:06:07 +0000 |
| Subject: | note 77519 added to function.set-include-path | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-130081@lists.php.net to get a copy of this message | ||
You cannot eliminate the path using '' (lambda, 0-length string). In other words, this
doesn't do what you think it does (in PHP 4 or 5):
<?php
set_include_path(''); // does NOT set PATH to ''
ini_set('include_path', ''); // also does NOT set PATH to ''
?>
The only "work-around" I've found is to use a whitespace string:
<?php
set_include_path(' '); // sets PATH to ' '
ini_set('include_path', ' '); // also sets PATH to ' '
?>
This is arguably a bug, as there are situations where security demands you eliminate the include
path and explicitly state the path for all included files.
http://bytejar.com/ - Software Lessons Learned the Hard Way
----
Server IP: 69.147.83.197
Probable Submitter: 24.148.133.105
----
Manual Page -- http://www.php.net/manual/en/function.set-include-path.php
Edit -- https://master.php.net/note/edit/77519
Del: integrated -- https://master.php.net/note/delete/77519/integrated
Del: useless -- https://master.php.net/note/delete/77519/useless
Del: bad code -- https://master.php.net/note/delete/77519/bad+code
Del: spam -- https://master.php.net/note/delete/77519/spam
Del: non-english -- https://master.php.net/note/delete/77519/non-english
Del: in docs -- https://master.php.net/note/delete/77519/in+docs
Del: other reasons-- https://master.php.net/note/delete/77519
Reject -- https://master.php.net/note/reject/77519
Search -- https://master.php.net/manage/user-notes.php