Possible Duplicate:
including php file from another server with php爲什麼我得到1而不是所需的文件?
我想有我自己的錯誤的系統,而不是具有PHP錯誤,這樣的例子,我需要從另一臺服務器上的文件,並且該服務器目前無法使用
<?php
require 'http://example.com/file.php' or die ("that host is not available right now");
?>
而是我得到
Warning: require(1) [function.require]: failed to open stream: No such file or directory in C:\xampp\htdocs\index.php on line 5
Fatal error: require() [function.require]: Failed opening required '1' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\index.php on line 5
如果您不是'example.com'的管理員,這是一個非常糟糕的主意。 – Dennis
@Pablo不,這不是'require(1)'的原因。 '1'是這裏的問題。 – deceze