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=0failed to open stream: no suitable wrapper 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 haveallow_url_includedisabled inphp.ini.Instead, use
include __DIR__ . '/system/application/config.php';If you are using < 5.3, then replace
__DIR__withdirname(__FILE__).