[转载]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');
?>
posted @ 2017-11-23 14:55  Newman·Li  阅读(281)  评论(0编辑  收藏  举报