include_path怎么修改,急

c570704361 2015-06-17 09:56:02
include_path = .:/usr/local/lib/php:./include是不都是改成这样啊。
...全文
226 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
傲雪星枫 2015-06-18
  • 打赏
  • 举报
回复
可以使用set_include_path来设置。 并且可以设置多个

$inc_path = array(
    '/Common',
    '/Db',
    '/Upload',
);
set_include_path(get_include_path() . PATH_SEPARATOR . implode(PATH_SEPARATOR, $inc_path));
http://php.net/manual/zh/function.set-include-path.php
小在在 2015-06-18
  • 打赏
  • 举报
回复
$path='/usr/xxx';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);

21,873

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧