Include config file using url?
I have struggled with including config file in php. i have a config.php file in TAA/system/application/config but i need to include that config file to my local.php presented in TAA/ so i did this but it throw error message.
http:// wrapper is disabled in the server configuration by allow_url_include=0
failed to open stream: no suitable wra开发者_如何学运维pper could be found
i include the config file using include("http://baseurl/TAA/system/application/config/config.php");
Don't specify the http: protocol. That will just make PHP request the file using HTTP. You also have allow_url_include disabled in php.ini.
Instead, use include __DIR__ . '/system/application/config.php';
If you are using < 5.3, then replace __DIR__ with dirname(__FILE__).
加载中,请稍侯......
精彩评论