$outputtext=fgets($fp,filesize($testfile));

解决方案 »

  1.   

    ggg.txt文件不存在。或者路径不对
      

  2.   

    <?
                    $testfile="gg.txt";
                    $fp=file($testfile);
                    while($int_a=0;$int_a<count($fp);$int_a++){
                        $info.=$fp[$int_a]."<br>\n";
                    }
                    print "$testfile文本内容:\n".$info;
    ?>Parse error: parse error in C:\Documents and Settings\Administrator\search\fopen.php on line 4
    那么请问这又是哪里错了呢?
      

  3.   

    $testfile="gg.txt";
                    $fp=file($testfile);
                    for($int_a=0;$int_a<count($fp);$int_a++){
                        $info.=$fp[$int_a]."<br>\n";
                    }
                    print "$testfile文本内容:\n".$info;
      

  4.   

    TO:ccxxcc(cc小超)
    容我再问一句啊,现在我按你的修改了,但又出现了以下提示Warning: file(gg.txt): failed to open stream: No such file or directory in C:\Documents and Settings\Administrator\李俊\search\fopen.php on line 3
    即$fp=file($testfile);这一句出错了,这是为什么啊?