<?php
// --------------------------------------------------------------------------------
// PhpConcept Library - Zip Module 2.1
// --------------------------------------------------------------------------------
// License GNU/LGPL - Vincent Blavet - December 2003
// http://www.phpconcept.net
// --------------------------------------------------------------------------------
//
// Presentation :
// PclZip is a PHP library that manage ZIP archives.
// So far tests show that archives generated by PclZip are readable by
// WinZip application and other tools.
//
// Description :
// See readme.txt and http://www.phpconcept.net
//
// Warning :
// This library and the associated files are non commercial, non professional
// work.
// It should not have unexpected results. However if any damage is caused by
// this software the author can not be responsible.
// The use of this software is at the risk of the user.
//
// --------------------------------------------------------------------------------
// $Id: pclzip-trace.lib.php,v 1.37 2003/12/31 11:50:23 vblavet Exp $
// --------------------------------------------------------------------------------
// ----- Constants
define( 'PCLZIP_READ_BLOCK_SIZE', 2048 );
// ----- File list separator
// In version 1.x of PclZip, the separator for file list is a space
// (which is not a very smart choice, specifically for windows paths !).
// A better separator should be a comma (,). This constant gives you the
// abilty to change that.
// However notice that changing this value, may have impact on existing
// scripts, using space separated filenames.
// Recommanded values for compatibility with older versions :
//define( 'PCLZIP_SEPARATOR', ' ' );
// Recommanded values for smart separation of filenames.
define( 'PCLZIP_SEPARATOR', ',' );
// ----- Error configuration
// 0 : PclZip Class integrated error handling
// 1 : PclError external library error handling. By enabling this
// you must ensure that you have included PclError library.
// [2,...] : reserved for futur use
define( 'PCLZIP_ERROR_EXTERNAL', 0 );
// ----- Optional static temporary directory
// By default temporary files are generated in the script current
// path.
// If defined :
// - MUST BE terminated by a '/'.
// - MUST be a valid, already created directory
// Samples :
// define( 'PCLZIP_TEMPORARY_DIR', '/temp/' );
// define( 'PCLZIP_TEMPORARY_DIR', 'C:/Temp/' );
define( 'PCLZIP_TEMPORARY_DIR', '' );
// --------------------------------------------------------------------------------
// ***** UNDER THIS LINE NOTHING NEEDS TO BE MODIFIED *****
// --------------------------------------------------------------------------------
// ----- Global variables
$g_pclzip_version = "2.1";
// ----- Error codes
// -1 : Unable to open file in binary write mode
// -2 : Unable to open file in binary read mode
// -3 : Invalid parameters
// -4 : File does not exist
// -5 : Filename is too long (max. 255)
// -6 : Not a valid zip file
// -7 : Invalid extracted file size
// -8 : Unable to create directory
// -9 : Invalid archive extension
// -10 : Invalid archive format
// -11 : Unable to delete file (unlink)
// -12 : Unable to rename file (rename)
// -13 : Invalid header checksum
// -14 : Invalid archive size
define( 'PCLZIP_ERR_USER_ABORTED', 2 );
define( 'PCLZIP_ERR_NO_ERROR', 0 );
define( 'PCLZIP_ERR_WRITE_OPEN_FAIL', -1 );
define( 'PCLZIP_ERR_READ_OPEN_FAIL', -2 );
define( 'PCLZIP_ERR_INVALID_PARAMETER', -3 );
define( 'PCLZIP_ERR_MISSING_FILE', -4 );
define( 'PCLZIP_ERR_FILENAME_TOO_LONG', -5 );
define( 'PCLZIP_ERR_INVALID_ZIP', -6 );
define( 'PCLZIP_ERR_BAD_EXTRACTED_FILE', -7 );
define( 'PCLZIP_ERR_DIR_CREATE_FAIL', -8 );
define( 'PCLZIP_ERR_BAD_EXTENSION', -9 );
define( 'PCLZIP_ERR_BAD_FORMAT', -10 );
define( 'PCLZIP_ERR_DELETE_FILE_FAIL', -11 );
define( 'PCLZIP_ERR_RENAME_FILE_FAIL', -12 );
define( 'PCLZIP_ERR_BAD_CHECKSUM', -13 );
define( 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP', -14 );
define( 'PCLZIP_ERR_MISSING_OPTION_VALUE', -15 );
define( 'PCLZIP_ERR_INVALID_OPTION_VALUE', -16 );
// ----- Options values
define( 'PCLZIP_OPT_PATH', 77001 );
define( 'PCLZIP_OPT_ADD_PATH', 77002 );
define( 'PCLZIP_OPT_REMOVE_PATH', 77003 );
define( 'PCLZIP_OPT_REMOVE_ALL_PATH', 77004 );
define( 'PCLZIP_OPT_SET_CHMOD', 77005 );
define( 'PCLZIP_OPT_EXTRACT_AS_STRING', 77006 );
define( 'PCLZIP_OPT_NO_COMPRESSION', 77007 );
define( 'PCLZIP_OPT_BY_NAME', 77008 );
define( 'PCLZIP_OPT_BY_INDEX', 77009 );
define( 'PCLZIP_OPT_BY_EREG', 77010 );
define( 'PCLZIP_OPT_BY_PREG', 77011 );
define( 'PCLZIP_OPT_COMMENT', 77012 );
define( 'PCLZIP_OPT_ADD_COMMENT', 77013 );
define( 'PCLZIP_OPT_PREPEND_COMMENT', 77014 );
define( 'PCLZIP_OPT_EXTRACT_IN_OUTPUT', 77015 );
// ----- Call backs values
define( 'PCLZIP_CB_PRE_EXTRACT', 78001 );
define( 'PCLZIP_CB_POST_EXTRACT', 78002 );
define( 'PCLZIP_CB_PRE_ADD', 78003 );
define( 'PCLZIP_CB_POST_ADD', 78004 );
/* For futur use
define( 'PCLZIP_CB_PRE_LIST', 78005 );
define( 'PCLZIP_CB_POST_LIST', 78006 );
define( 'PCLZIP_CB_PRE_DELETE', 78007 );
define( 'PCLZIP_CB_POST_DELETE', 78008 );
*/
// --------------------------------------------------------------------------------
// Class : PclZip
// Description :
// PclZip is the class that represent a Zip archive.
// The public methods allow the manipulation of the archive.
// Attributes :
// Attributes must not be accessed directly.
// Methods :
// PclZip() : Object creator
// create() : Creates the Zip archive
// listContent() : List the content of the Zip archive
// extract() : Extract the content of the archive
// properties() : List the properties of the archive
// --------------------------------------------------------------------------------
class PclZip
{
// ----- Filename of the zip file
var $zipname = '';
// ----- File descriptor of the zip file
var $zip_fd = 0;
// ----- Internal error handling
var $error_code = 1;
var $error_string = '';
// --------------------------------------------------------------------------------
// Function : PclZip()
// Description :
// Creates a PclZip object and set the name of the associated Zip archive
// filename.
// Note that no real action is taken, if the archive does not exist it is not
// created. Use create() for that.
// --------------------------------------------------------------------------------
function PclZip($p_zipname)
{
PclTraceFctStart(__FILE__, __LINE__, 'PclZip::PclZip', "zipname=$p_zipname");
// ----- Tests the zlib
if (!function_exists('gzopen'))
{
PclTraceFctMessage(__FILE__, __LINE__, 1, "zlib extension seems to be missing");
die('Abort '.basename(__FILE__).' : Missing zlib extensions');
}
// ----- Set the attributes
$this->zipname = $p_zipname;
$this->zip_fd = 0;
// ----- Return
PclTraceFctEnd(__FILE__, __LINE__, 1);
return;
}
// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------
// Function :
// create($p_filelist, $p_add_dir="", $p_remove_dir="")
// create($p_filelist, $p_option, $p_option_value, ...)
// Description :
// This method supports two different synopsis. The first one is historical.
// This method creates a Zip Archive. The Zip file is created in the
// filesystem. The files and directories indicated in $p_filelist
// are added in the archive. See the parameters description for
没有合适的资源?快使用搜索试试~ 我知道了~
media_web_cfg.rar_PHP 文件操作_js as socket php_js sock_js网页配置_sock
共118个文件
svn-base:60个
php:29个
gif:9个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 67 浏览量
2022-09-21
05:31:54
上传
评论
收藏 299KB RAR 举报
温馨提示
一个基于PHP语言与JS的网页,里面有Socket通信与PHP对配置文件与XML文件的操作
资源推荐
资源详情
资源评论
收起资源包目录
media_web_cfg.rar_PHP 文件操作_js as socket php_js sock_js网页配置_sock (118个子文件)
log_view.php.bak 4KB
server_info.php.bak 2KB
socket_command.php.bak 1KB
style.css 224B
entries 5KB
entries 2KB
entries 845B
entries 531B
entries 380B
entries 373B
ini.fct 30KB
nav_logo.gif 5KB
stripes_gray.gif 855B
stripes_gray_dark.gif 855B
divider.gif 837B
spacer.gif 807B
link.gif 523B
dialog_bottom.gif 402B
dialog_top.gif 400B
dialog_side.gif 43B
file-cfg.ini 83B
vcom.jpg 4KB
prototype16.js 123KB
prototype15.js 94KB
jquery126.js 54KB
string.js 2KB
op.log 0B
action.ph_ 2KB
pclzip-trace.lib.php 195KB
modify_server.php 18KB
add_server.php 14KB
action.php 9KB
server_cfg.php 8KB
zip_class.php 8KB
zip_down_class.php 7KB
log_op.php 7KB
process_log_list.php 6KB
file_op.php 5KB
pwd_edit.php 5KB
index.php 5KB
log_view.php 4KB
online_users_info.php 3KB
process_info.php 3KB
server_info.php 2KB
socketComm.php 2KB
aib.php 2KB
nav.php 2KB
home.php 2KB
socket_command.php 2KB
xml.php 1KB
xml_class.php 1KB
download.php 1KB
top.php 852B
start.php 709B
log_info.php 703B
zip_test.php 283B
phpinfo.php 16B
pclzip-trace.lib.php.svn-base 195KB
prototype16.js.svn-base 123KB
prototype15.js.svn-base 94KB
jquery126.js.svn-base 54KB
ini.fct.svn-base 30KB
modify_server.php.svn-base 18KB
add_server.php.svn-base 14KB
action.php.svn-base 9KB
server_cfg.php.svn-base 8KB
zip_class.php.svn-base 8KB
zip_down_class.php.svn-base 7KB
log_op.php.svn-base 7KB
process_log_list.php.svn-base 6KB
file_op.php.svn-base 5KB
pwd_edit.php.svn-base 5KB
index.php.svn-base 5KB
nav_logo.gif.svn-base 5KB
log_view.php.svn-base 4KB
vcom.jpg.svn-base 4KB
online_users_info.php.svn-base 3KB
process_info.php.svn-base 3KB
string.js.svn-base 2KB
server_info.php.svn-base 2KB
socketComm.php.svn-base 2KB
aib.php.svn-base 2KB
action.ph_.svn-base 2KB
nav.php.svn-base 2KB
home.php.svn-base 2KB
xml.php.svn-base 1KB
xml_class.php.svn-base 1KB
socket_command.php.svn-base 1KB
download.php.svn-base 1KB
stripes_gray_dark.gif.svn-base 855B
stripes_gray.gif.svn-base 855B
top.php.svn-base 852B
divider.gif.svn-base 837B
spacer.gif.svn-base 807B
start.php.svn-base 709B
log_info.php.svn-base 703B
link.gif.svn-base 523B
dialog_bottom.gif.svn-base 402B
dialog_top.gif.svn-base 400B
zip_test.php.svn-base 283B
共 118 条
- 1
- 2
资源评论
小波思基
- 粉丝: 72
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功