Home > Backend Development > PHP Tutorial > php-PHP ini_set('include_path')生效但是include出错

php-PHP ini_set('include_path')生效但是include出错

WBOY
Release: 2016-06-02 11:34:28
Original
1050 people have browsed it

php

小白的问题
代码如下:

ini_set('include_path',ini_get('include_path').PATH_SEPARATOR .dirname(__FILE__).PATH_SEPARATOR .'\conf');
echo ini_get('include_path');
if(!file_exists('conf/conf.php')) die('config error');
include_once('conf.php') ;

报错:
.;D:\xampp\php\PEAR;D:\web\bottle;\conf
Warning: include_once(conf.php) [function.include-once]: failed to open stream: No such file or directory in D:\web\bottle\index.php on line 6

Warning: include_once() [function.include]: Failed opening 'conf.php' for inclusion (include_path='.;D:\xampp\php\PEAR;D:\web\bottle;\conf') in D:\web\bottle\index.php on line 6

不理解为什么环境变量设置都生效了但是还不能自动包含?不知道怎么去查这个问题了,谢谢指教

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template