想要包含从主域到子域的文件
index.php - 开启subdomain.example.com
ini_set("allow_url_fopen", 1);
ini_set("allow_url_include", 1);
$host = $_SERVER['HTTP_HOST'];
if($host == 'localhost'){include("../navt.php");}
else{include("https://example.com/navt.php");}
在本地主机上 - 远程服务器上没有问题(win 10,xampp,chrome)
- 我仍然得到这个:
include(): https:// wrapper is disabled in the server configuration by allow_url_include=0