国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

? ??? ?? PHP ???? PHP ?? ?? ??? ???

PHP ?? ?? ??? ???

Jul 25, 2016 am 08:45 AM

????, php
  1. /*
  2. ?? ??: /include/zip.php
  3. ???: Horace 2009/04/15
  4. */
  5. class PHPZip{
  6. var $dirInfo = array("0","0");
  7. var $rootDir = '';
  8. var $datasec = ??();
  9. var $ctrl_dir = ??();
  10. var $eof_ctrl_dir = "/x50/x4b/x05/x06/x00/x00/x00/x00";
  11. var $old_offset = 0;
  12. function downloadZip(){
  13. createZip($dir, $zipfilename, true);
  14. }
  15. function createZip($dir, $zipfilename, $autoDownload = false){
  16. if (@function_exists('gzcompress')){
  17. @set_time_limit("0");
  18. if (is_array($dir)){
  19. $fd = fopen ($dir, "r");
  20. $fileValue = fread($fd, ?? ??($filename));
  21. fclose($fd);
  22. if (is_array($dir)) $filename = basename($dir);
  23. $?? -> addFile($fileValue, "$filename");
  24. }else{
  25. $this->dirTree($dir,$dir);
  26. }
  27. $zipfilenametemp = time().$zipfilename;
  28. $out = $this -> ??zip();
  29. $fp = fopen($zipfilenametemp, "w");
  30. fwrite($fp, $out, strlen($out));
  31. fclose($fp);
  32. $filesize = ?? ??($zipfilenametemp);
  33. if ($filesize < 104857600) {
  34. if($autoDownload){
  35. header("??? ??: ??????/??-???");
  36. header("Content-disposition: attachment; filename=".$zipfilename);
  37. }
  38. echo $this -> ??zip();
  39. }else{
  40. echo "zip ?? ??!";
  41. }
  42. unlink($zipfilenametemp);
  43. }
  44. }
  45. //dir ?? ????..
  46. function dirTree($directory,$rootDir){
  47. global $_SERVER,$dirInfo,$rootDir;
  48. $fileDir=$rootDir;
  49. $myDir=dir($directory);
  50. while($file=$myDir->read()){
  51. if(is_dir("$directory/$file") ? $file!="." ? $file !=".."){
  52. $dirInfo[0] ;
  53. $rootDir ="$fileDir$file/";
  54. $?? -> addFile('', "$rootDir");
  55. //n?? ??? ??
  56. $this->dirTree("$directory/$file",$rootDir);
  57. }else{
  58. if($file!="." and $file!=".."){
  59. $dirInfo[1] ;
  60. //$fd = fopen ("$directory/$file", "r");
  61. $fileValue = file_get_contents("$directory/$file");
  62. //fclose($fd);
  63. $?? -> addFile($fileValue, "$fileDir$file");
  64. }
  65. }
  66. }
  67. $myDir->close();
  68. }
  69. function unix2DosTime($unixtime = 0) {
  70. $timearray = ($unixtime == 0) ? getdate() : getdate($unixtime);
  71. if ($timearray['??'] < 1980) {
  72. $timearray['??'] = 1980;
  73. $timearray['mon'] = 1;
  74. $timearray['mday'] = 1;
  75. $timearray['??'] = 0;
  76. $timearray['?'] = 0;
  77. $timearray['?'] = 0;
  78. } //
  79. ?? ?? return (($timearray['year'] - 1980) << 25) | ($timearray['mon'] << 21) | ($timearray['mday'] << 16) |
  80. ($timearray['hours'] << 11) | ($timearray['?'] << 5) | ($timearray['?'] >> 1);
  81. }
  82. function addFile($data, $name, $time = 0){
  83. $name = str_replace('//', '/', $name);
  84. $dtime = decex($this->unix2DosTime($time));
  85. $hexdtime = '/x' . $dtime[6] . $dtime[7]
  86. . '/x' . $dtime[4] . $dtime[5]
  87. . '/x' . $dtime[2] . $dtime[3]
  88. . '/x' . $dtime[0] . $dtime[1];
  89. eval('$hexdtime = "' . $hexdtime . '";');
  90. $fr = "/x50/x4b/x03/x04";
  91. $fr .= "/x14/x00"; //
  92. $fr .= "/x00/x00";? ???? ? ??? ?????. // ?? ?? ?? ???
  93. $fr .= "/x08/x00"; // ?? ??
  94. $fr .= $hexdtime; // ??? ?? ?? ? ??
  95. // "?? ?? ??" ????
  96. $unc_len = strlen($data);
  97. $crc = crc32($data);
  98. $zdata = gzcompress($data);
  99. $c_len = strlen($zdata);
  100. $zdata = substr(substr($zdata, 0, strlen($zdata) - 4), 2); // crc ?? ??
  101. $fr .= pack('V', $crc); // crc32
  102. $fr .= pack('V', $c_len); // ??? ?? ??
  103. $fr .= pack('V', $unc_len); // ???? ?? ?? ??
  104. $fr .= pack('v', strlen($name)); // ?? ?? ??
  105. $fr .= pack('v', 0); // ?? ?? ??
  106. $fr .= $name;
  107. // "?? ???" ????
  108. $fr .= $zdata;
  109. // "??? ???" ????(?? ????? ????? ?? ?? ???
  110. // ??? ???)
  111. $fr .= pack('V', $crc); // crc32
  112. $fr .= pack('V', $c_len); // ??? ?? ??
  113. $fr .= pack('V', $unc_len); // ???? ?? ?? ??
  114. // ? ??? ??? ?????
  115. $this -> ????[] = $fr;
  116. $new_offset = strlen(implode('', $this->datasec));
  117. // ?? ?? ???? ???? ?????.
  118. $cdrec = "/x50/x4b/x01/x02";
  119. $cdrec .= "/x00/x00"; //
  120. ? ?? ???? ?? $cdrec .= "/x14/x00"; //
  121. ? ???? ? ??? ?? $cdrec .= "/x00/x00"; // ?? ?? ?? ???
  122. $cdrec .= "/x08/x00"; // ?? ??
  123. $cdrec .= $hexdtime; // ??? ?? ?? ? ??
  124. $cdrec .= pack('V', $crc); // crc32
  125. $cdrec .= pack('V', $c_len); // ??? ?? ??
  126. $cdrec .= pack('V', $unc_len); // ???? ?? ?? ??
  127. $cdrec .= pack('v', strlen($name) ); // ?? ?? ??
  128. $cdrec .= pack('v', 0 ); // ?? ?? ??
  129. $cdrec .= pack('v', 0 ); // ?? ?? ??
  130. $cdrec .= pack('v', 0 ); // ??? ?? ??
  131. $cdrec .= pack('v', 0 ); // ?? ?? ??
  132. $cdrec .= pack('V', 32 ); // ?? ?? ?? - '????' ?? ??
  133. $cdrec .= pack('V', $this -> old_offset ); // ?? ??? ?? ???
  134. $this -> old_offset = $new_offset;
  135. $cdrec .= $??;
  136. // ??? ?? ??, ?? ??? ??? ?????.
  137. // ?? ????? ??
  138. $this -> ctrl_dir[] = $cdrec;
  139. }
  140. function filezip(){
  141. $data = implode('', $this -> datasec);
  142. $ctrldir = implode('', $this -> ctrl_dir);
  143. $data? ?????.
  144. $ctrldir .
  145. $?? -> eof_ctrl_dir .
  146. pack('v', sizeof($this -> ctrl_dir)) . // "? ???? ??" ??? ? ??
  147. pack('v', sizeof($this -> ctrl_dir)) . // ?? ??? ? ??
  148. pack('V', strlen($ctrldir)) . // ?? ????? ??
  149. pack('V', strlen($data)) . // ?? ???? ?? ???
  150. "/x00/x00"; // .zip ?? ?? ??
  151. }
  152. }
  153. ?>
  154. 還有另??個(gè)比較簡(jiǎn)單?
  155. [php] ?? ?? ??
  156. ??? createzip
  157. {
  158. /* @??? zip ??? ?????.
  159. * @destination 目標(biāo)文件的路徑 如"c:/androidyue.zip"
  160. * @$overwrite 是否為覆蓋與目標(biāo)文件???件
  161. * @Recorded By Androidyue
  162. * @Blog: http://thinkblog.sinaapp.com
  163. */
  164. function create_zip($files = array(),$destination = '',$overwrite = false)
  165. {
  166. //如果zip文件已經(jīng)存在并且設(shè)置為不返回false
  167. if(file_exists($destination) && !$overwrite) { return false; }
  168. $valid_files = array();
  169. //??? ??? ??...
  170. //?? ??? ?? ?? ????
  171. if(is_array($files)) {
  172. //? ??? ??
  173. foreach($files as $file) {
  174. //??? ????? ??
  175. if(file_exists($file)) {
  176. $valid_files[] = $file ;
  177. }
  178. }
  179. }
  180. //?? ??? ??? ?? ??
  181. if(count($valid_files))
  182. {
  183. //???? ??
  184. $zip = new ZipArchive();
  185. //??? ???. ??? ?? ??? ?????.
  186. if($zip->open($destination,$overwrite) ? ZIPARCHIVE::OVERWRITE : ZIPARCHIVE ::CREATE) !== true) {
  187. return false;
  188. }
  189. //?? ??? ?? ??
  190. foreach($valid_files as $file) {
  191. $zip-> ;addFile($file,$file);
  192. }
  193. //?? ??
  194. $zip->close()
  195. //??? ??? ?? exists
  196. return file_exists($destination );
  197. }
  198. else{
  199. //?? ??? ??? ??? false? ?????.
  200. return false;
  201. }
  202. /* ***
  203. //??? ??
  204. $files=array('temp.php','test.php')
  205. create_zip($files, 'myzipfile.zip', true); ****/
  206. ?>
  207. ?? ??

? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

? AI ??

Undresser.AI Undress

Undresser.AI Undress

???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover

AI Clothes Remover

???? ?? ???? ??? AI ?????.

Video Face Swap

Video Face Swap

??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

???

??? ??

???++7.3.1

???++7.3.1

???? ?? ?? ?? ???

SublimeText3 ??? ??

SublimeText3 ??? ??

??? ??, ???? ?? ????.

???? 13.0.1 ???

???? 13.0.1 ???

??? PHP ?? ?? ??

???? CS6

???? CS6

??? ? ?? ??

SublimeText3 Mac ??

SublimeText3 Mac ??

? ??? ?? ?? ?????(SublimeText3)

???

??? ??

?? ????
1783
16
Cakephp ????
1727
56
??? ????
1577
28
PHP ????
1442
31
???
PHP?? ?? ? ??? ????? ????????? PHP?? ?? ? ??? ????? ????????? Jun 20, 2025 am 01:03 AM

TOSECURELYHANDLEAUSTENCENDACTIONANDACTERIZINGINPHP, FORCUCTSESTEPS : 1. ALWAYSHASHPASSWORTHPASSWORD_HASH () ? VERVERIFYUSINGPANSWORD_VERIFY (), usePREPAREDSTATEMENTSTOPREVENTSQLINGERGED, andSTOREUSERSESSEATAIN $ _SESSIONSAFTERLOGIN.2.impleplempletrole ?? ACCESSC

PHP?? ?? ???? ??? ??? ?? ? ? ??????? PHP?? ?? ???? ??? ??? ?? ? ? ??????? Jun 19, 2025 am 01:05 AM

PHP?? ?? ???? ???? ????? ??? ?? ??? ???? ?? ??? ??? ??? ???? ????. 1. finfo_file ()? ???? ?? ?? ??? ???? ???/jpeg? ?? ?? ?? ? ?????. 2. uniqid ()? ???? ??? ?? ??? ???? ? Web ?? ????? ??????. 3. php.ini ? html ??? ?? ?? ??? ???? ???? ??? 0755? ?????. 4. Clamav? ???? ???? ???? ??? ??????. ??? ??? ?? ???? ????? ???? ?? ??? ????? ???? ??? ? ??? ?????.

PHP?? == (??? ??)? === (??? ??)? ???? ?????? PHP?? == (??? ??)? === (??? ??)? ???? ?????? Jun 19, 2025 am 01:07 AM

PHP?? ==? ==? ?? ???? ?? ??? ??????. == ?? ??? ?? ?? ?????. ?? ??, 5 == "5"? true? ????, ?? ??? ???? ?? ?? ??? ????? ????? (? : 5 === "5"? false? ?????. ?? ?????? ===? ? ???? ?? ?????? == ?? ??? ??? ???? ?????.

php (, -, *, /, %)?? ?? ??? ??? ?????? php (, -, *, /, %)?? ?? ??? ??? ?????? Jun 19, 2025 pm 05:13 PM

PHP?? ?? ??? ??? ???? ??? ??? ????. 1. ?? ??? ?? ? ?? ??? ??? ???? ???? ??? ? ????. ??? ??? ???? ????? ????? ???? ????. 2. ?? ?? ?? - ??, ??? ???? ?? ??? ?????. 3. ?? ???? ??? ??? ???? ??? ??? ?????. 4. Division? / ??? ???? 0?? ??? ?? ????? ??? ?? ??? ?? ? ? ????. 5. ???? ??? ???? ?? ?? ? ?? ??? ???? ? ??? ? ???, ??? ?? ? ? ??? ??? ???? ?????. ? ???? ???? ???? ??? ??? ??? ???? ?? ??? ? ??????? ????.

PHP? NOSQL ?????? (? : MongoDB, Redis)? ??? ?? ??? ? ????? PHP? NOSQL ?????? (? : MongoDB, Redis)? ??? ?? ??? ? ????? Jun 19, 2025 am 01:07 AM

?, PHP? ?? ?? ?? ?????? ?? MongoDB ? Redis? ?? NOSQL ??????? ?? ??? ? ????. ?? MongoDBPHP ???? (PECL ?? Composer? ?? ??)? ???? ????? ????? ??? ?????? ? ???? ????? ??, ??, ?? ? ?? ??? ?????. ??, Predis ????? ?? Phpredis ??? ???? Redis? ???? ?? ? ?? ? ??? ???? ??? ????? Phpredis? ???? ?? Predis? ?? ??? ?????. ? ? ?? ??? ???? ? ????? ????.

?? PHP ?? ? ?? ??? ??? ?? ??? ?????? ?? PHP ?? ? ?? ??? ??? ?? ??? ?????? Jun 23, 2025 am 12:56 AM

tostaycurrentwithphpdevelopments ? bestpractices, followkeynewssources lifephp.netandphpweekly, adgytwithcommunitiesonforumsandconferences, readlingupdated andgrad indewfeatures, andreadorcontributetoopensourceproceprosts.first

PHP ? ???? ? ??? ? ?????? PHP ? ???? ? ??? ? ?????? Jun 23, 2025 am 12:55 AM

phpbecamepupularforwebdevelopmentduetoiteofleneflening, whithhtml, wididepreadhostingsupport, andalargeecosystemincludingframeworkslikelaravelandcmsplatformsformslikewordpress.itexcelsinhandlingformsubmissions, managingussess, interptisussivers, ?? ???

PHP ???? ???? ??? PHP ???? ???? ??? Jun 25, 2025 am 01:00 AM

TOSETTHERIGHTTIMEZONEINPHP, usedate_default_timezone_set () functionattStartOfyourscriptwitHavalidInlifiersuchas'America/new_york'.1.edate_default_timezone_set () beforeanydate/timeFunctions.2

See all articles