[转载]allow_url_include
原文地址:allow_url_include
作者:粤之豪
allow_url_include | "0" | PHP_INI_ALL | PHP_INI_SYSTEM in PHP 5. Available since PHP 5.2.0. |
默认状态是关闭的。在php.ini 修改为;
;Whether to allow include/require to open URLs (like http:// or ftp://) as files.
; http://php.net/allow-url-include
allow_url_include = on
a.php:
<?php
$data = include 'http://www.domain.com/b.php';
var_dump($data);
?>
b.php:
<?php
return array('username'=>'lukai');
?>