php¶ÔzipÎļþ½âѹºÍѹËõ
<?php
/**
* @author wyt
*
*/
class zip {
private $_zipObj=null;
private $_zipfcArr=array();
private $_basePath=null;
private $_zipName;
/**
* init
* @param zipÎļþÃû³Æ $zipName
*/
function __construct($zipName){
$this->_zipName=$zipName;
$this->_zipObj=new rezip();
}
/**
* ѹËõÒ»¸öÎļþ¼Ð
* @param Ŀ¼Ãû³Æ $path
*/
public function tozip($path){
$this->_basePath=$path;
$this->_basePath.='/';
$this->direct($path);
$this->_zipObj->Add($this->_zipfcArr,1);
//дÈëÎļþ
if(@fputs(@fopen($this->_zipName,"wb"),$this->_zipObj->get_file())) return $this->_zipName;
return false;
}
/**
* ½âѹzipÎļþ
* @param ½âѹµ½µÄÎļþ¼Ð $destPath
*/
public function unzip($destPath){
if(!file_exists($destPath)) @mkdir($destPath,0777,true);
return $this->_zipObj->Extract($this->_zipName,$destPath);
}
function direct($path){
$handler=opendir($path);
while(($file=readdir($handler))!==false){
if($file=='.'||$file=='..') continue;
$tmp=$path.'/'.$file;
$filename=str_replace($this->_basePath,'',$tmp);
if(is_dir($tmp)){
$this->direct($tmp);
}else{
//Éú³ÉµÄzip ÎļþÃû
echo $tmp."\n";
$filesize=@filesize($tmp);
$fp=@fopen($tmp,rb);
$this->_zipfcArr[]=Array($filename,@fread($fp,$filesize));
@fclose($fp);
}
}
closedir($handler);
}
}
/**
* ѹËõÀ࣬½øÐÐÁËССµÄ¸Ä¶¯
*
*/
class rezip{
var $datasec, $ctrl_dir = array();
var $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00";
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->Re
Ïà¹ØÎĵµ£º
strtotimeº¯ÊýÊÇÒ»¸öºÜºÃµÄº¯Êý,Áé»îµÄÔËÓÃËü,»á¸øÄãµÄ¹¤×÷´øÀ´²»ÉÙ·½±ã.µ«PHPµÄÊÖ²áÖÐÈ´¶Ô´Ëº¯ÊýµÄ²ÎÊýû×÷Ì«¶à½éÉÜ,¶ÔЩº¯ÊýµÄÆäËû½éÉÜÒ²·Ç³£ÉÙ¡£
ÏÈ¿´ÊÖ²á½éÉÜ£º
strtotime — ½«ÈκÎÓ¢ÎÄÎı¾µÄÈÕÆÚʱ¼äÃèÊö½âÎöΪ Unix ʱ¼ä´Á
¸ñʽ£ºint strtotime ( string $time [, int $now ] )
¡¡¡¡±¾º¯ÊýÔ¤ÆÚ½ÓÊÜÒ ......
OpenX adserver version 2.8.1 and lower is vulnerable to remote code
execution. To be exploited, this vulnerability requires banner / file
upload permissions, such as granted to the 'advertiser' and
'administrator' roles.
This vulnerability is caused by the (insecure) file upload mechanism of
af ......
ʹÓÃphpµÄ³£¼ûÎÊÌâÊÇ£º±àÒëphpʱÍü¼ÇÌí¼ÓijÀ©Õ¹£¬ºóÀ´ÏëÌí¼ÓÀ©Õ¹£¬µ«ÊÇÒòΪ°²×°phpºóÓÖ×°ÁËһЩ¶«Î÷ÈçPEARµÈ£¬²»Ïëɾ³ýĿ¼ÖØ×°£¬±ð˵£¬php»¹ÕæÓÐÕâÑùµÄ¹¦ÄÜ¡£
¡¡¡¡ÎÒûÓÐÔÚÊÖ²áÖп´µ½¡£
¡¡¡¡ÈçÎÒÏëÔö¼ÓbcmathÖ§³Ö£¬ÕâÊÇÒ»¸öÖ§³Ö´óÕûÊý¼ÆËãµÄÀ©Õ¹¡£windows×Ô´ø¶øÇÒÄÚÖã¬linux“±¾ÀຯÊý½öÔÚ PHP ±àÒëʱÅäÖÃÁË --ena ......
<?php
#--Config--#
$login_password= '123456'; //ÕâÊÇÃÜÂë
#----------#
error_reporting(E_ALL);
set_time_limit(0);
ini_set("max_execution_time","0");
ini_set("memory_limit","9999M");
set_magic_quotes_runtime(0);
if(!isset($_SERVER))$_SERVER = &$HTTP_SERVER_VARS;
if(!isset($_POST))$_PO ......
<?php
function genpage(&$sql,$page_size=10)
{
global $pages,$sums,$eachpage,$page; //×ÜÒ³Êý£¬×ܼǼ£¬Ã¿Ò³Êý£¬µ±Ç°Ò³
$page = $_GET["page"];
if($page ==0)$page =1;
$eachpage = $page_s ......