My code is :
$fileName = 'http://www.test.com/test.txt';
$fileRes = fopen($fileName,'rb');
fseek($fileRes, -100,  SEEK_END);
$content = fread($fileRes, 10);
It gives this error :
Warning: fseek() [function.fseek]: stream does not support seeking in /home/skrsoft/public_html/a.php on line 10开发者_运维问答
This error is returned for all files ! Why ?
You are opening HTTP stream and not a local file.
You cannot use fseek, but you can check the content-length header, if it is sent, and skip (with fread() but without assigning to $content) as many bytes as needed
You can't use fseek with fopen file pointers that use ftp:// or http:// move the file local before using fseek.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论