PHP5的很多功能扩展都转到 PECL 项目里了. ==== http://cn.php.net/get/pecl-5.0.4-Win32.zip/from/a/mirrorWhat is PECL?PECL is a repository for PHP Extensions, providing a directory of all known extensions and hosting facilities for downloading and development of PHP extensions.The packaging and distribution system used by PECL is shared with its sister, PEAR.
/* zip 文件解压程序
* Written By 唯她
* URI: http://www.m121m.net
* 需要有 php_zip.dll / php_zip.so 库支持
*/$zipFile = "putty-src.zip";$zip = zip_open($zipFile);function mk_dir($dirString,$initDir="./"){
$dir = explode("/",$dirString);
if (substr($initDir,-1) != "/" && $initDir != "")
$initDir .= $initDir."/"; for($i=0;$i<count($dir)-1;$i++){
$initDir .= $dir[$i] . "/";
if(!file_exists($initDir) && count($dir) > 1) mkdir($initDir);
};
echo "创建目录: $initDir\n";
}if ($zip) { while ($zip_entry = zip_read($zip)) { if (substr(zip_entry_name($zip_entry),-1) != "/" && zip_entry_open($zip, $zip_entry, "r")) { if (!file_exists(dirname(zip_entry_name($zip_entry))))
{
mk_dir(zip_entry_name($zip_entry));
}
$buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
$fout = fopen(zip_entry_name($zip_entry),"w");
fwrite($fout,$buf);
echo "解压文件:".zip_entry_name($zip_entry)."\n";
zip_entry_close($zip_entry);
} else {
mk_dir(zip_entry_name($zip_entry));
} } zip_close($zip);}?>
可以下载PECL
PECL是什么?到哪里下载呢
====
http://cn.php.net/get/pecl-5.0.4-Win32.zip/from/a/mirrorWhat is PECL?PECL is a repository for PHP Extensions, providing a directory of all known extensions and hosting facilities for downloading and development of PHP extensions.The packaging and distribution system used by PECL is shared with its sister, PEAR.
服务器不支持就没办法
谁用过这个类阿
怎么我用过几次都不行啊那位有PHP_zip.dll下灾啊 我还是用这个算了