★ wanayoo — archive 1999 http://www.php.net/manual/kr/function.set-include-path.phpNouvelle recherche | Portail wanayoo
PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<restore_include_pathset_magic_quotes_runtime>
view the version of this page
Last updated: Fri, 22 Aug 2003

set_include_path

(PHP 4 >= 4.3.0)

set_include_path --  Sets the include_path configuration option

Description

string set_include_path ( string new_include_path)

Sets the include_path configuration option for the duration of the script. Returns the old include_path on success or FALSE on failure.

예 1. set_include_path() example

<?php
// Works as of PHP 4.3.0
set_include_path('/inc');

// Works in all PHP versions
ini_set('include_path', '/inc');
?>

See also ini_set(), get_include_path(), restore_include_path(), and include().



add a note add a note User Contributed Notes
set_include_path
giovanni at giacobbi dot net
30-Sep-2003 07:58
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 ':'

<restore_include_pathset_magic_quotes_runtime>
 Last updated: Fri, 22 Aug 2003
show source | credits | sitemap | mirror sites 
Copyright © 2001-2003 The PHP Group
All rights reserved.
This mirror generously provided by: Web Hosting Talk
Last updated: Wed Oct 15 10:10:28 2003 EDT