set_include_path — 设置 include_path 配置选项为当前脚本设置 include_path 运行时的配置选项。
2015-12-28 21:35
453 查看
说明
string set_include_path ( string$new_include_path)
为当前脚本设置 include_path 运行时的配置选项。
参数
new_include_path
include_path 新的值。
返回值
成功时返回旧的 include_path 或者在失败时返回FALSE。
范例
Example #1 [b]set_include_path() 例子[/b]<?php // 自 PHP 4.3.0 起可用 set_include_path('/usr/lib/pear'); // 在所有版本的 PHP 中均可用 ini_set('include_path', '/usr/lib/pear'); ?>
Example #2 添加到include path
利用常量
PATH_SEPARATOR可跨平台扩展 include path。
这个例子中我们把 /usr/lib/pear 添加到了
现有的 include_path 的尾部。
<?php $path = '/usr/lib/pear'; set_include_path(get_include_path() . PATH_SEPARATOR . $path); ?>
参见
ini_set() - 为一个配置选项设置值get_include_path() - 获取当前的 include_path 配置选项
restore_include_path() - 还原 include_path 配置选项的值
include - include
相关文章推荐
- Android_HttpURLConnection_Get和Post请求
- UVA 216
- Oracle EBS 交叉币种(3)-应收交叉币种
- 前端开发入门:框架篇-ExpressJS入门学习
- jsp 静态引入<%@ include %> 动态引入<jsp:include> 区别
- what is the CCA?
- kuangbin_ShortPath I (POJ 2240)
- hive原生和复合类型的数据加载和使用
- 欢迎使用CSDN-markdown编辑器
- Linux命令
- 数据库筛选用户,然后去掉一部分(列表求差),再随机返回一个用户。sqlalchemy + python集合(set) + random
- iOS 保存图片或视频到PhotoLibrary
- SpringMVC RESTful总结之GET请求
- 在64位ubuntu上安装tensorflow
- 《VR入门系列教程》之2---VR头显
- STL 中 算法的遍历和排序
- 根据Request获取客户端IP
- 12月28日
- 出来工作半年感想
- ng-repeat 指令(带有对象)