php½âѹÎļþ£¬Ñ¹Ëõ
zip.class.php
CODE:
[¸´ÖƵ½¼ôÇаå]
<?
class
zip
{
var
$datasec
,
$ctrl_dir
= array();
var
$eof_ctrl_dir
=
"x50x4bx05x06x00x00x00x00"
;
var
$old_offset
=
0
; var
$dirs
= Array(
"."
);
function
get_List
(
$zip_name
)
{
$zip
= @
fopen
(
$zip_name
,
'rb'
);
if(!
$zip
) return(
0
);
$centd
=
$this
->
ReadCentralDir
(
$zip
,
$zip_name
);
@
rewind
(
$zip
);
@
fseek
(
$zip
,
$centd
[
'offset'
]);
for (
$i
=
0
;
$i
<
$centd
[
'entries'
];
$i
++)
{
$header
=
$this
->
ReadCentralFileHeaders
(
$zip
);
$header
[
'index'
] =
$i
;
$info
[
'filename'
] =
$header
[
'filename'
];
$info
[
'stored_filename'
] =
$header
[
'stored_filename'
];
$info
[
'size'
] =
$header
[
'size'
];
$info
[
'compressed_size'
]=
$header
[
'compressed_size'
];
$info
[
'crc'
] =
strtoupper
(
dechex
(
$header
[
'crc'
] ));
$info
[
'mtime'
] =
$header
[
'mtime'
];
$info
[
'comment'
] =
$header
[
'comment'
];
$info
[
'folder'
] = (
$header
[
'external'
]==
0x41FF0010
||
$header
[
'external'
]==
16
)?
1
:
0
;
$info
[
'index'
] =
$header
[
'index'
];
$info
[
'status'
] =
$header
[
'status'
];
$ret
[]=
$info
; unset(
$header
);
}
return
$ret
;
}
funct
Ïà¹ØÎĵµ£º
0¡¢Óõ¥ÒýºÅ´úÌæË«ÒýºÅÀ´°üº¬×Ö·û´®£¬ÕâÑù×ö»á¸ü¿ìһЩ¡£ÒòΪPHP»áÔÚË«ÒýºÅ°üΧµÄ×Ö·û´®ÖÐËÑѰ±äÁ¿£¬µ¥ÒýºÅÔò²»»á£¬×¢Ò⣺ֻÓÐechoÄÜÕâô×ö£¬ËüÊÇÒ»ÖÖ¿ÉÒ԰Ѷà¸ö×Ö·û´®µ±×÷²ÎÊýµÄ“º¯Êý”£¨Òë×¢£ºPHPÊÖ²áÖÐ˵echoÊÇÓïÑԽṹ£¬²»ÊÇÕæÕýµÄº¯Êý£¬¹Ê°Ñº¯Êý¼ÓÉÏÁËË«ÒýºÅ£©¡£
1¡¢Èç¹ûÄܽ«ÀàµÄ·½·¨¶¨Òå³Éstatic£¬¾Í¾¡Á¿ ......
ÔÎÄÁ´½Ó£ºhttp://www.phpdo.net/index.php/2010/02/03/1-10/
ÓëÆäËû±à³ÌÓïÑÔ²»Í¬µÄÊÇ£ºPHPµÄÊý¾ÝÀàÐͲ»ÊÇÓɳÌÐòÔ±ÔÚ¶¨Òå±äÁ¿µÄʱºò¾ö¶¨µÄ£¬¶øÊÇÓÉPHPÔÚ³ÌÐòÔËÐйý³ÌÖж¨Òå¡£
PHP¹²Ö§³Ö8ÖÖÊý¾ÝÀàÐÍ£ºÕûÐÍ£¨integer£©¡¢¸¡µãÐÍ£¨float£©¡¢×Ö·û´®ÐÍ£¨string£©ºÍ²¼¶ûÐÍ£¨Boolean£©ËÄÖÖ±êÁ¿ÀàÐÍ£¬Êý×飨array£©ºÍ¶ÔÏó£¨object£ ......
תÑÛÓÖÊÇÒ»Äê¹ýÈ¥ÁË£¬Ëƺõ£¬×î½üÎåÁùÄêÀ´£¬Ò»Ö±¶¼¹ýµÃ²»ÄÇô˳Àû£¬½ñÄ껹ËãÊDz»´í£¬ÖÁÉÙ£¬ÔÚ¿Í»§¡¢ÀϰåºÍͬʵİïÖúÏ£¬Ò»ÄêµÄ¹¤×÷£¬ÖÕÓÚÔÚÄêǰÊÕβÁË¡£ÔÚ´ËС½áһϣ¬ÎüȡһЩ½Ìѵ£¬ÒÔÃâÀ´ÄêÖØ·¸ÏàͬµÄ´íÎó¡£
1¡¢×öÁËÒ»¸ö×îÕýÈ·µÄÑ¡Ôñ£º¹Ò¿¿Ò»¼ÒÈí¼þ¹«Ë¾×ö³ÌÐò¡£×ö³ÌÐòºÍ×öÒµÎñ£¬ÊDz»Ó¦¸Ãͬһ¸öÈ˽øÐе쬾ÍËã¿Í»§ÊÇÖ÷¶¯É ......
It is possible to define constant values on a per-class basis remaining the same and unchangeable.
Constants differ from normal variables in that you don't use the $ symbol to declare or use them. Like static members, constant values cannot be accessed from an instance of the object (using $obje ......