我的财富手册
相对用得少的函数--set_include_path
上一篇 /
下一篇 2007-08-15 15:32:22
其实用处不大,如果做MVC的时候,设定了会很麻烦
set_include_path
(PHP 4 >= 4.3.0, PHP 5)
set_include_path — Sets the include_path configuration option
说明
string
set_include_path( string $new_include_path )
Sets theinclude_pathconfiguration option for the duration of the scrīpt.
参数
返回值
Returns the oldinclude_pathon success orFALSEon failure.
范例
例 1748. set_include_path()example
<?php
set_include_path('/inc');
ini_set('include_path','/inc');
?>
例 1749. Adding to the include path
Making use of thePATH_SEPARATORconstant, it is possible to extend the include path regardless of the operating system.
In this example we add/usr/lib/pearto the end of the existinginclude_path.
<?php
$path='/usr/lib/pear';
set_include_path(get_include_path() .PATH_SEPARATOR.$path);
?>
参见
导入论坛
收藏
分享给好友
管理
举报
TAG: