When reading from a zip file if the initial call to zip_entry_read() returns false it would be advisable to run mkdir with the file name since it it very likely that the zero length file was a directory and attempts to save the files within the directory will fail if you dont create it first
zip_entry_read
(PHP 4 >= 4.0.7, PHP 5 >= 5.2.0, PECL zip:1.0-1.9.0)
zip_entry_read — オープンされたディレクトリエントリから読み込む
説明
string zip_entry_read
( resource $zip_entry
[, int $length
] )
オープンされたディレクトリエントリから読み込みます。
パラメータ
- zip_entry
-
zip_read()により返されたディレクトリエントリ
- length
-
返すバイト数。指定されない場合、この関数は1024バイトを読み込みます。
注意: これは、読み込むデータの非圧縮時の長さとなります。
返り値
読み込んだデータ、または、ファイルの終端に達した時に FALSE を返します。 reached.
zip_entry_read
Matt
17-Nov-2005 09:53
17-Nov-2005 09:53