★ wanayoo — archive 1999 http://www.php.net/manual/tr/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: Sat, 17 Jul 2004

set_include_path

(PHP 4 >= 4.3.0, PHP 5)

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.

Örnek 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 10: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: Sat, 17 Jul 2004
show source | credits | sitemap | contact | advertising | mirror sites 
Copyright © 2001-2004 The PHP Group
All rights reserved.
This mirror generously provided by: Web Hosting Talk
Last updated: Thu Sep 30 21:14:12 2004 EDT