2012-11-27 62 views

回答

1

您可以下載該文件的內容到一個PHP文件,然後包括,

$url = "http://sub.example.com/index.php"; 
$file = file_get_contents($url); 
file_put_contents('index.php', $file); 
include index.php; 

我建議改變從index.php中壽的名字,並確保PHP文件不被第一解析當你得到它。

對此也沒有什麼安全的。

編輯:另一種選擇,

有一個叫allow_url_include一個php.ini選項。

http://php.net/manual/en/features.remote-files.php

相關問題