配置php.ini以开启跨域名调用文件
php下跨域名调用文件,默认是不被允许的,比如会有如下的警告提示:
PHP Warning: require() [function.require]: http:// wrapper is disabled in the server configuration by allow_url_include=0 in F:\nuodou\default.php on line 20 PHP Warning: require(http://www.discuz.com/source/class/class_core.php) [function.require]: failed to open stream: no suitable wrapper could be found in F:\nuodou.com\default.php on line 20
解决方法也简单,只需要配置一下php.ini文件,修改后:
allow_url_include = On
然后运行一下 iisreet,重启一下IIS即可!