<?php $a = file_get_content("/dh/nav5.html"); echo $a; ?>报错。。/dh/nav5.html 确实存在的。 Fatal error: Call to undefined function file_get_content() in G:\freehost\test19\web\loadxml.php on line 2
看一下配置文件 allow_url_fopen = On
我的那个神,应该是 file_get_contents 楼上几位大哥给我小写一个 s ,正好我又太粗心,一直到现在才找到原因,这下我可记住了 "file_get_contents"
<?php
function test(){
header('Location:http://www.baidu.com');
}
test();
?>
$a = "<script>location.href='http://www.baidu.com'</script>";
echo $a;?>
试试这样
$a = "<script>location.href='http://www.baidu.com'</script>";
echo $a;?>
试试这样
//是这样的么?确实没理解楼主的意思。
$base_url = ""; //1.html 所在目录
$a = file_get_content($base_url."1.html");
echo $a;
?>
$a = file_get_content("/dh/nav5.html");
echo $a;
?>报错。。/dh/nav5.html 确实存在的。
Fatal error: Call to undefined function file_get_content() in G:\freehost\test19\web\loadxml.php on line 2
allow_url_fopen = On