PHP的高手都哪里去了啊????

解决方案 »

  1.   

    $fp=fopen("filename","w+");while(!feof($fp))
    {
      fseek($fp,1);
    }这样就能把指针移到文件尾吧,
      

  2.   

    hehe 楼上, 人家要的是最后一行, 非文件尾.
      

  3.   

    function get_file(file) {
    $f = file($file,"r");
                      $index = count($f);
                       $fd = fopen($file,"r");    
    for($i=0;$i< $index;$i++) {
    $rec = fgets($fd,1024*5);    
    }
    fclose($fd);
    return $rec;    
    }