gzread zip problem
Posted: Thu Jun 10, 2004 1:03 am
HI,
Follwoing is code I am using for reading zip and writing in another file.
But it do not read complete file.It may be filesize problem.
My zlib version is 1.2.0.7
PHP Version 4.3.3
Apache 2.0
function gunzip($filename,$destfile)
{
$zp = gzopen($filename, "r");
$fp = fopen($destfile, "w");
fputs($fp, gzread($zp, filesize($filename))) ;
fclose($fp);
gzclose($zp);
}
Follwoing is code I am using for reading zip and writing in another file.
But it do not read complete file.It may be filesize problem.
My zlib version is 1.2.0.7
PHP Version 4.3.3
Apache 2.0
function gunzip($filename,$destfile)
{
$zp = gzopen($filename, "r");
$fp = fopen($destfile, "w");
fputs($fp, gzread($zp, filesize($filename))) ;
fclose($fp);
gzclose($zp);
}