PHP Zip解壓 文件在線解壓縮的函數(shù)代碼
更新時(shí)間:2010年05月26日 00:34:37 作者:
PHP在線解壓縮Zip 文件函數(shù)代碼,需要在線zip解壓的朋友可以參考下。
復(fù)制代碼 代碼如下:
/**********************
*@file - path to zip file
*@destination - destination directory for unzipped files
*/
function unzip_file($file, $destination){
// create object
$zip = new ZipArchive() ;
// open archive
if ($zip->open($file) !== TRUE) {
die ('Could not open archive');
}
// extract contents to destination directory
$zip->extractTo($destination);
// close archive
$zip->close();
echo 'Archive extracted to directory';
}
PHP Zip壓縮 在線對文件進(jìn)行壓縮的函數(shù)
相關(guān)文章
php求今天、昨天、明天時(shí)間戳的簡單實(shí)現(xiàn)方法
這篇文章主要介紹了php求今天、昨天、明天時(shí)間戳的方法,實(shí)例分析了strtotime函數(shù)的常見使用技巧,非常簡單實(shí)用,需要的朋友可以參考下2016-07-07PHP基于ORM方式操作MySQL數(shù)據(jù)庫實(shí)例
這篇文章主要介紹了PHP基于ORM方式操作MySQL數(shù)據(jù)庫,結(jié)合具體實(shí)例形式分析了php針對mysql數(shù)據(jù)庫常用操作的封裝與使用技巧,需要的朋友可以參考下2017-06-06win2003服務(wù)器使用WPS的COM組件的一些問題解決方法
項(xiàng)目中使用了新功能,gump同學(xué)研究出來的使用WPS的COM組件用PHP實(shí)現(xiàn)將doc等office格式轉(zhuǎn)換成pdf2012-01-01PHP Trait代碼復(fù)用類與多繼承實(shí)現(xiàn)方法詳解
這篇文章主要介紹了PHP Trait代碼復(fù)用類與多繼承實(shí)現(xiàn)方法,結(jié)合實(shí)例形式詳細(xì)分析了Trait代碼復(fù)用類的原理并結(jié)合具體實(shí)例形式分析了php基于Trait多繼承的相關(guān)實(shí)現(xiàn)與使用技巧,需要的朋友可以參考下2019-06-06