关于HTML_Template_IT包,该怎么解决
程序员文章站
2022-05-10 15:13:55
...
关于HTML_Template_IT包
IT.php 里有require_once "pear.php" ,
这意味着要把pear.php 放到HTML/Template/里面么?
------解决方案--------------------
1用
include_path
修改php.ini,需要重启服务
2用set_include_path 或者ini_set.
范例
Example #1 set_include_path() example
// Works as of PHP 4.3.0
set_include_path('/inc');
// Works in all PHP versions
ini_set('include_path', '/inc');
?>
Example #2 Adding to the include path
Making use of the PATH_SEPARATOR constant, it is possible to extend the include path regardless of the operating system.
In this example we add /usr/lib/pear to the end of the existing include_path.
$path = '/usr/lib/pear';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
?>
IT.php 里有require_once "pear.php" ,
这意味着要把pear.php 放到HTML/Template/里面么?
------解决方案--------------------
1用
include_path
修改php.ini,需要重启服务
2用set_include_path 或者ini_set.
范例
Example #1 set_include_path() example
// Works as of PHP 4.3.0
set_include_path('/inc');
// Works in all PHP versions
ini_set('include_path', '/inc');
?>
Example #2 Adding to the include path
Making use of the PATH_SEPARATOR constant, it is possible to extend the include path regardless of the operating system.
In this example we add /usr/lib/pear to the end of the existing include_path.
$path = '/usr/lib/pear';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
?>
相关文章
相关视频
上一篇: 一个比较狠的抽象类[PHP]
下一篇: 分享一个延迟加载的js