我使用这个脚本,看.text的文件的内容 -为什么我不能看到我的.txt文件,从这个php脚本
<?php
$file = fopen("Gin_List_Website.txt","r");
if(!file)
{
echo("ERROR:cant open file .. :(");
}
else
{
echo("opened the file .. :)");
$buff = fread ($file,filesize("Gin_List_Website.txt"));
print $buff;
echo $buff;
}
?>
但所有我看到的是这一行
opened the file .. :)
我在做什么错?
如果你只是想完整的文件,为什么不使用'file'或'file_get_contents'? – chris85
如果(!文件)更改为if(!$文件) –
@bharatparmar我错过了,现在它给出错误.. –