note 77519 deleted from function.set-include-path by nlopess

From: Date: Sun, 02 Sep 2007 10:20:33 +0000
Subject: note 77519 deleted from function.set-include-path by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-130095@lists.php.net to get a copy of this message
Note Submitter: bishop (php at ideacode dot com) Reason: spam ---- 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

« previous php.notes (#130095) next »