We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
您好,我在测试时,发现在CLI模式下可以正常使用,但网页端请求脚本则无法获取正确结果(网页获取phpinfo可以正常显示yaconf扩展相关配置项,可以确定php.ini配置没什么大问题),请问在使用方式上有限制吗?还是需要进行其他的设置?
【我测试环境】 apache2.4 + php和yaconf扩展都是采用源码编译的方式(php版本为7.0.9,yaconf为github上clone的最新代码[2016.12.19])。
php7 编译:
./configure -prefix=/usr/local/php7 --with-apxs2=/usr/sbin/apxs --enable-fpm --enable-debug make && make install
yaconf编译:
./configure --with-php-config=/usr/local/php7/bin/php-config make && make install
php.ini配置文件:
[yaconf] yaconf.directory=/tmp/yaconf
/tmp/yaconf目录下test.ini资源文件内容:
name="yaconf" year=2016
php测试代码test.php:
var_dump(Yaconf::get('test'));
实验效果:
$php -f test.php array(2) { ["name"]=> string(4) "test" ["year"]=> string(4) "2016" } 通过网页访问test.php返回: NULL
The text was updated successfully, but these errors were encountered:
当然不是.....-_#
Sorry, something went wrong.
No branches or pull requests
您好,我在测试时,发现在CLI模式下可以正常使用,但网页端请求脚本则无法获取正确结果(网页获取phpinfo可以正常显示yaconf扩展相关配置项,可以确定php.ini配置没什么大问题),请问在使用方式上有限制吗?还是需要进行其他的设置?
【我测试环境】
apache2.4 + php和yaconf扩展都是采用源码编译的方式(php版本为7.0.9,yaconf为github上clone的最新代码[2016.12.19])。
php7 编译:
./configure -prefix=/usr/local/php7 --with-apxs2=/usr/sbin/apxs --enable-fpm --enable-debug
make && make install
yaconf编译:
./configure --with-php-config=/usr/local/php7/bin/php-config
make && make install
php.ini配置文件:
[yaconf]
yaconf.directory=/tmp/yaconf
/tmp/yaconf目录下test.ini资源文件内容:
name="yaconf"
year=2016
php测试代码test.php:
var_dump(Yaconf::get('test'));
实验效果:
$php -f test.php
array(2) {
["name"]=>
string(4) "test"
["year"]=>
string(4) "2016"
}
通过网页访问test.php返回:
NULL
The text was updated successfully, but these errors were encountered: