PHP - Seek in filehandle pointing to file in zip? -
I want to print a particular line (200th standard) of a file in the zip archive. I am trying the following: $ file = new SplFileObject ("zip: //archive.zip#file.txt"); $ File & gt; (200), echo $ file- & gt; Key () "\ N"; Echo $ file- & gt; Present (); But I get PHP Warning: SplFileObject :: seek (): does not support the demand in PHP.php on Stream Line 2 PHP Fatal Error: 'unreliable exception' can not rewind file with 'RuntimeException' message: //archive.zip # file.txt 'in script.php: 2 If I have to file With open and SplFileObject parameter "file.txt" , it works fine Does this document anywhere that zip file does not work for? I was unable to find it or am I doing something wrong? Thank you. Good questions The behavior you want is clearly expressed by the syntax that you have used. is. I consider it a bug, you can probably report it here The stream should be controlled internally with no-rewind and ...