zip & unzip files using PHP

0 6

zip & unzip files using PHP : in this post you will learn how to zip files and uzip a compressed file after reading my whole php articles i think you will be able to create a file manager in php , below function will Opens a new zip archive for reading, writing or modifying.

mixed ZipArchive::open ( string $filename [, int $flags ] )

Create zip file 

unzip a compressed file 

Returns TRUE on success or the error code.

  • ZipArchive::ER_EXISTS : File already exists.

  • ZipArchive::ER_INCONS : Zip archive inconsistent.

  • ZipArchive::ER_INVAL : Invalid argument.

  • ZipArchive::ER_MEMORY : Malloc failure.

  • ZipArchive::ER_NOENT : No such file.

  • ZipArchive::ER_NOZIP : Not a zip archive.

  • ZipArchive::ER_OPEN: Can’t open file.

  • ZipArchive::ER_READ : Read error.

  • ZipArchive::ER_SEEK : Seek error.

این مطلب هم میتواند برای شما مفید باشد   Disk access Time , Seek time , Latency & RPM