note 36194 added to function.set-include-path
| From: | giovanni at giacobbi dot net | Date: | Tue, 30 Sep 2003 11:58:00 +0000 |
| Subject: | note 36194 added to function.set-include-path | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-57388@lists.php.net to get a copy of this message | ||
You can append (or prepend, with proper changes) a directory to your include
path and preserve the original one this way:
<?php
$new_include_dir = "/home/user/php_includes";
print get_include_path() . "\n";
set_include_path(get_include_path() . ":" . $new_include_dir);
print get_include_path() . "\n";
?>
Output is:
.:/usr/local/lib/php
.:/usr/local/lib/php:/home/user/php_includes
Just remember that directories are separated by ':'
----
Manual Page -- http://www.php.net/manual/en/function.set-include-path.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+36194
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+36194&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+36194&report=yes