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

? ??? ?? PHP ???? ASP ?? ??? PHP ?? ??? ??? ??

ASP ?? ??? PHP ?? ??? ??? ??

Jul 29, 2016 am 08:46 AM

?? ?? ??? ??? ????.


/**
* ?? ??? ??
*/
class uploadFile {
public $max_size = '1000000';//??? ?? ?? ??
public $ file_name = 'date';//?? ??? ??? ??? ???? ??? ???? ?? ???? ?? ???? ??? ??? ?????
public $allow_types;//???? ???? ?? ???, ?? ?? ??? "|"? ?????.
public $errmsg = '';//?? ???
public $uploaded = '';//???? ?? ??(?? ?? ??)
public $save_path;//???? ?? ?? ??
private $ files;//??? ?? ?? ??? ??
private $file_type = array();//?? ??
private $ext = '';//???? ?? ???
/**
* ???, ??? ???
* @access public
* @param string $file_name ???? ?? ??
* @param string $save_path ???? ?? ??
* /
?? ?? __construct($save_path = './upload/',$file_name = 'date',$allow_types = '') {
$this->file_name = $file_name;//?? ??? ?? ??? ?? ?? ??? ????, ?? ????
$this->save_path = (preg_match('//$/',$save_path)) ? $save_path : $save_path
$ this? ?????. ->allow_types = $allow_types == '' ? 'jpg|gif|png|zip|rar' : $allow_types
}
/**
* ?? ???
* @access public
* @param $files ??? ?? ?? ??(??? $_FILES[])
* @return boolean ?? ? ??
*/
?? ?? upload_file( $ ??) {
$name = $files['name']
$type = $files['type']
$size = $files['size']
$ tmp_name = $files['tmp_name'];
$error = $files['error']
???($error) {
case 0 : $this->errmsg = ''; >break;
case 1 : $this->errmsg = 'php.ini? ?? ??? ??????';
break
case 2 : $this->errmsg = '?? ??? ??????. ???? ??? ??';
break
case 3 : $this->errmsg = '??? ??? ????????.'
break
case 4: $this-> ;errmsg = '???? ??? ????.';
break;
case 5 : $this->errmsg = '???? ?? ??? 0???.'
break
???: $this- >errmsg = '?? ???? ??????! ';
break;
}
if($error == 0 && is_uploaded_file($tmp_name)) {
//?? ?? ??
if($this->check_file_type($ name) == FALSE){
return FALSE;
}
//?? ?? ??
if($size > $this->max_size){
$this-> errmsg = '???? ?? '.$name.'? ?? ???. ?? ?? ??? '.ceil($this->max_size /1024).' kb file';
return
}
$this->set_save_path();//?? ?? ?? ??
$new_name this->file_name != 'date' ? $this->file_name.'.'.$this->ext : date('YmdHis').'.'.$this->ext;//Set ? ?? ??
$this->uploaded = $this->save_path.$new_name;//???? ?? ??
//?? ??
if(move_uploaded_file($tmp_name,$this-> ;uploaded)) {
$this->errmsg = '??'.$this->????????.'????? ????????! ';
return TRUE;
}else{
$this->errmsg = '??'.$this->???? ??????.';
FALSE ??
}
}
/**
* ???? ?? ?? ??
* @access public
* @param string $filename ?? ?? ?? ?? ??
* @return ??? ???? TRUE, FALSE?? ?? ??? ????
*/
?? ?? check_file_type($filename){
$ext = $this ->get_file_type($filename);
$this->ext = $ext;
$allow_types =explore('|',$this->allow_types);//??? ?? ?? ???? ?????. ??? ??
//echo $ext
//???? ?? ???? ??? ??? ?? ????? ??
if(in_array($ext,$allow_types)){
return TRUE;
}else{
$this->errmsg = '?? ???'.$filename.'?? ??, ???? ?????'.str_replace('|',',',$this->allow_types).' ? ?? ?? ??!'
return FALSE; }
/**
* ?? ?? ????
* @access public
* @param string $filename ?? ??? ??? ?? ?? ??
* @return string ?? ??
*/
?? ?? get_file_type($filename){
$info = pathinfo($filename)
$ext = $info['extension']
return $ext;
}
/**
* ?? ??? ? ?? ??? ?????
*/
?? ?? set_save_path(){
$this->save_path = (preg_match('//$/', $this ->save_path)) ? $this->save_path : '/'
if(!is_dir($this->save_path)){
//If ????? ???? ???
$this->set_dir()
}
}
/**
* ???? ??
* @access public
* @param string $dir ???? ?? ??
* @return boolean ?? ???? ???? ?? ? FALSE
*/
?? ?? set_dir($dir = null){
//??? ????? ??
if(!$dir){
$dir = $this->save_path
}
if(is_dir($dir) ){
$ this->errmsg = '????? ??? ?? ?????! ';
}
$dir =explore('/', $dir);
foreach($dir as $v){
if($v){
$d .= $v .'/';
if(!is_dir($d)){
$state = mkdir($d, 0777)
if(!$state)
$this-> ;errmsg = '$d ???? ?? ? ?? ??'!';
}
}
}
true? ?????.
}
}
/*************************************************
* ??? ?? ???
*
* ???? ???, ???? ? ?? ??? ??? ? ????
* ? ???? ?? ???? UTF8???. GBK?? ????? ??? ???? ?????. img_mark ????? iconv ??? ?????
*
* UTF8 ??? ???? ??(??)? ????? ?? ?? ??? ??? ???? ?? ?? ??? ?? ??? ??
* ?? ????? ??? ? ????. ????? ?? ?????. ????? get_mark_xy ???? $strc_w = strlen($this->mark_str)*7 5? ?? GD ????? ??? ?????
* ? ??
* ? ???? ?? ????? ????? GD ????? 2.0 ??? ?????
*
* @author kickflip@php100 QQ263340607
************ ******************************* **************/
??? uploadImg? uploadFile? ?????.
public $mark_str = 'kickflip@php100'; //???? ???
public $str_r = 0; //??? ?? R
public $str_g = 0; //??? ?? G
public $ str_b = 0 ; //??? ?? B
public $mark_ttf = './upload/SIMSUN.TTC'; //???? ??? ?? ??(?? ??)
public $mark_logo = './upload/logo .png'; //??? ????
public $resize_h;//??? ?? ??
public $resize_w;//??? ?? ??
public $source_img;//?? ??? ??
public $dst_path = './ upload/';//??? ?? ?? ????, ???? ?? ??? ?? ????
/**
* ??? ??? ??
* @access public
* @param ?? $w ??? ???? ??(px)
* @param ?? $h ??? ???? ??(px) px)
* @param string $source_img ?? ???(?? ???)
*/
public function img_reized($w,$h, $source_img = NULL){
$source_img = $source_img == NULL ? $this->uploaded : $source_img;//?? ??? ????? ???? ???? ??????
if(! is_file($source_img)) { //?? ???? ????? ?????
$this->errmsg = 'File'.$source_img.'does not presents'
return FALSE; >$this->source_img = $source_img;
$img_info = getimagesize($source_img);
$source = $this->img_create($source_img); //?? ??? ???
$ this ->resize_w = $w;
$this->resize_h = $h;
$thumb = imagecreatetruecolor($w,$h)
imagecopyreized($thumb,$source,0, 0 ,0,0,$w,$h,$img_info[0],$img_info[1]);//??? ??? ??
$dst_path = $this->dst_path == $this -> ;save_path : $this->dst_path; //?? ?? ?? ????
$dst_path = (preg_match('//$/',$dst_path)) ? $dst_path : '/'; ?? ?? ?? / ??
if(!is_dir($dst_path)) $this->set_dir($dst_path); //?? ??? ??? ??
$dst_name = $ this-> ;set_newname($source_img);
$this->img_output($thumb,$dst_name);//??? ??
imagedestroy($source)
imagedestroy($thumb)>}
/**
*Watermark
*@access public
*@param string $source_img ?? ??? ?? ???
*@param ?? $mark_type ???? ??(1? ?? ???, 2? ??? ???, 3? ???) ?? ??, ???? ?? ???)
*@param ?? $mark_postion ???? ?? (1? ?? ??, 2? ??? ??, 3? ?? ??, 4? ??? ??) , ???? ??? ?????)
*@return ????? ?? ??
*/
?? ?? img_mark($source_img = NULL,$mark_type = 1,$mark_postion = 2) {
$source_img = $source_img == NULL ? ;uploaded: $source_img;//?? ?? ??? ?????. ?? ??? ????? ???? ???? ??????.
if(!is_file($source_img)) { //?? ???? ??? ??
$this->errmsg = '??'.$source_img.'???? ??';
FALSE ??
}
$this->source_img =
$img_info = getimagesize($source_img);
$source = $this->img_create($source_img); //?? ??? ??
$mark_xy = $this->get_mark_xy($mark_postion);//Get ???? ??
$mark_color = imagecolorallocate($source,$this->str_r,$this->str_g,$this->str_b)
switch($mark_type) {
case 1 : //?? ??? ???? ??
$str = $this->mark_str
imagestring($source,5,$mark_xy[0],$mark_xy[1],$str,$mark_color)
$ this->img_output($source,$source_img);
break;
?? 2: //??? ??? ???? ??
if(!is_file($this->mark_ttf)) // ?? ??? ??? ??
$this->errmsg = '???? ??: ?? ??'.$this->mark_ttf.'
return FALSE;
$str = $this->mark_str;
//$str = iconv('gbk','utf-8',$str);//?? ??? ?? GBK ???? ???? ?? ?????. ? ? ??
imagettftext($source,12,0,$mark_xy[2],$mark_xy[3],$mark_color,$this->mark_ttf,$str)
$this->img_output ($source,$ source_img);
break;
case 3: //??? ???? ??
if(is_file($this->mark_logo)){ //????? ?? ???? ?? ?? ?? ???? ?? ??? ????, ???? ??? ?????.
$logo_info = getimagesize($this->mark_logo)
}else{
$this->errmsg = '???? ??: ?? ?? '.$this->mark_logo? ???? ????!' ';
?? ??
}
$logo_info = getimagesize($this->mark_logo)
if($logo_info[0]>$img_info[0] || $logo_info[ 1]>$img_info[1]) { //?? ???? ?? ???? ?? ??
$this->errmsg = '???? ??: ?? ???'.$this->source_img? ?????. '??' .$this->mark_logo.'??!';
?? ??
}
$logo = $this->img_create($this->mark_logo)
imagecopy( $source, $logo, $mark_xy[4], $mark_xy[5], 0, 0, $logo_info[0], $logo_info[1])
$this->img_output($source,$source_img)
break
???: //?? ?? ??? ??????.
$str = $this->mark_str
imagestring($source,5,$mark_xy[0],$mark_xy[1],$str,$mark_color); >$this->img_output($source,$source_img);
break
}
imagedestroy($source)
}
/**
* ???? ?? ????
* @access private
* @param ?? $mark_postion ???? ??(1? ?? ?? ???, 2? ??? ?? ???, 3? ?? ?? ???) , 4? ??? ??, ???? ??? ??)
* @return array $mark_xy ???? ??? ?? (??? 0? ?? ??? ???? ?? X, ??? 1? ?? ??? ???? ?? Y,
* ??? 2? ??? ??? ???? ?? X, ??? 3? ??? ??? ???? ?? Y, ??? 4? ???? ??? ?? X, ??? 5? ???? ??? ?? Y)
*/
private function get_mark_xy($mark_postion){
$img_info = getimagesize($this->source_img);
$stre_w = strlen($this->mark_str)*9 5; ???? (px) (?? 5? ??? ??? ? 9px, ???? 5px ??)
//(?? 12? ?? ??? 12px, utf8? ?? ??? utf8) 3??????. 1???? 4px??, ??? ??? ??? ? 9px???.
// ??? ??? ???? ?? ? ??? ????? ??? ? * 7px? ?????.
$strc_w = strlen( $this->mark_str)*7 5; //???? ??? ???? ??(px)
if(is_file($this->mark_logo)){ //?? ?? ???? ?? ??, ?? ?? ???? ?? ??
$logo_info = getimagesize($this->mark_logo)
}
//imagestring ???? ???? ?? ??? ??? ??? ??? imagettftext ??? ??? ??? ???? Y ???? ??? ????
//imagestring ??? ???? ?? ???? ?????. imagettftext ??? ???? ?? ???? ?????.
switch($mark_postion){
case 1: //?? ?? ??
$mark_xy[0] = 5 //???? ?? ??? ?? X
$mark_xy[1] = $img_info [1]-20; //???? ?? ??? ?? Y
$mark_xy[2] = 5; //???? ??? ??? ?? $mark_xy[0] = $img_info[0]-$stre_w; ??? ?? X
$mark_xy[1] = $img_info[1]-20; //???? ?? ??? ?? Y
$mark_xy[2] = $img_info[0]-$strc_w; ?? X
$mark_xy[3] = $img_info[1]-5; //???? ??? ??? ?? Y
$mark_xy[4] = $img_info[0]-$logo_info[0]-5;/ /???? ??? ?? X
$mark_xy[5] = $img_info[1]-$logo_info[1]-5 ;//???? ??? ?? Y
break
case 3: //?? ?? ??; Corner
$mark_xy[0] = 5; //???? ?? ??? ?? X
$mark_xy[1] = 5; //???? ?? ??? ?? Y
$mark_xy[2] = 5; ???? ??? ??? ?? X
$mark_xy[3] = 15; //???? ??? ??? ?? Y
$mark_xy[4] = 5 //???? ??? ?? ??>$mark_xy[0] = $img_info[ 0]-$stre_w; //???? ?? ??? ?? X
$mark_xy[1] = 5; //???? ?? ??? ?? Y
$mark_xy[ 2] = $img_info[0]-$strc_w; /Watermark ??? ??? ?? X
$mark_xy[3] = 15; //Watermark ??? ??? ?? Y
$mark_xy[4] = $img_info [0]-$logo_info[0]-5;//Watermark ??? ?? ??? ??
$mark_xy[0] = $img_info[0]-$stre_w; //Watermark ?? ??? ?? X
$mark_xy[1] = $img_info[1]-5;//Watermark ??? ??? ?? Y
$mark_xy[2] = $img_info[0]-$strc_w; //???? ??? ??? ?? X
$mark_xy[3] = $img_info[1]-15; ??? ??? ?? Y
$mark_xy[4] = $img_info[0]-$logo_info[0]-5;//???? ??? ?? X
$mark_xy[5] = $img_info[1]-$logo_info [1]-5;//???? ??? ?? Y
break
}
return $mark_xy>}
/**
* ?? ??? ??
* @access private
* @param string $source_img ?? ???(?? ???)
* @return img ?? ???? ??? ??
*/
??? ?? img_create( $source_img) {
$info = getimagesize($source_img);
???($info[2]){
?? 1:
if(!function_exists('imagecreatefromgif')){
$source = @imagecreatefromjpeg($source_img);
}else{
$source = @imagecreatefromgif($source_img);
}
break; = @imagecreatefromjpeg($source_img);
break;
?? 3:
$source = @imagecreatefrompng($source_img)
break; imagecreatefromwbmp($source_img);
break;
???:
$source = FALSE;
return $source;
/**
* ??? ?? ???
* @access private
* @param string $source_img ?? ??? ?? ?? ??
* @return string $dst_name ??? ?? ??? ??(?? ?? ??)
*/
??? ?? set_newname($sourse_img) {
$info = pathinfo($sourse_img)
$new_name = $this->resize_w.'_' .$this->resize_h.'_'.$info['basename'];//?? ??? ???? ??: width_height_filename
if($this->dst_path == '') { //If ??? ?? ??? ?? ??? ????? ?? ??? ??? ?????.
$dst_name = str_replace($info['basename'],$new_name,$sourse_img)
}else{
$dst_name = $this->dst_path.$new_name;
return $dst_name;
}
/**
* ?? ???
* @access private
* @param $im ??? ???
* @param $dst_name ?? ??? ??(?? ?? ??)
* @return ?? ???
*/
?? ?? img_output($im,$ dst_name) {
$info = getimagesize($this->source_img);
???($info[2]){
?? 1:
if(!function_exists('imagegif')) {
imagejpeg($im,$dst_name);
}else{
imagegif($im, $dst_name)
}
break
imagejpeg($ im,$dst_name);
break;
?? 3:
imagepng($im,$dst_name)
break
imagewbmp($im, $dst_name) );
}
}
}
?>


php ?? ??? ??? ?? ?? ???
? ??? asp ?? ??? ??? ???? asp ?? ???? php ?? ??? ??? ???? ??? PHP ????? ??? ?? ????? ??? ???? ?????.


? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? 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)

???

??? ??

??? ????
1601
29
PHP ????
1502
276
???
PHP ?? ??? ??????? PHP ?? ??? ??????? Jul 17, 2025 am 04:16 AM

PHP ?? ??? ?? ???? ?? ? ????? ??? ?????. 1. ?? ??? ??? ??? ??? ? ? ??? ??? ??? ?? ?? ??? ???? ???????. 2. ?? ??? ???? ???? ? ?? ????? ?? ?? ?? ??? ?????. 3. $ _get ? $ _post? ?? Hyperglobal ??? ?? ???? ?? ??? ? ??? ??? ??????? ???????. 4. ?? ?? ?? ???? ?? ?? ?? ??? ?????? ?? ??? ??? ?? ??? ???????. ??? ??? ????? ??? ??? ?? ???? ????? ? ??? ? ? ????.

PHP?? ?? ???? ???? ???? ??? ?????? PHP?? ?? ???? ???? ???? ??? ?????? Jul 08, 2025 am 02:37 AM

PHP ?? ???? ???? ????? ?? ? ??? ???? ?? ?? ? ??? ???? ?? ??? ?????? ??? ??? ? ? ???????. 1. ??? ?? CSRF? ???? ?? ??? ??? ???? ?????? ??? ???? FINFO_FILE? ?? ?? MIME ??? ?????. 2. ??? ??? ??? ???? ??? ?? ??? ?? ? WEB ????? ??? ???? ??????. 3. PHP ?? ??? ?? ? ?? ???? NGINX/APACHE? ??? ????? ?? ???? ?????. 4. GD ?????? ??? ? ?? ???? ??? ?? ??? ?? ????.

PHP?? ?? ?? PHP?? ?? ?? Jul 18, 2025 am 04:57 AM

PHP ?? ???? ? ?? ???? ??? ????. 1. // ?? #? ???? ? ?? ??? ???? // ???? ?? ????. 2. ?? /.../ ?? ?? ?? ??? ????? ?? ? ?? ??? ?? ? ? ????. 3. ?? ?? ?? / if () {} /? ?? ?? ??? ????? ??? ?? ?? ?? ??? ???? ????? ???? ??? ?? ???? ???? ??? ? ??? ??????.

PHP?? ???? ??? ?????? PHP?? ???? ??? ?????? Jul 11, 2025 am 03:12 AM

Ageneratorinphpisamemory- ???? Way-Erate-Overgedatasetsetsbaluesoneatimeatimeatimeatimallatonce.1.generatorsuseTheyieldKeywordTocroadtOpvaluesondemand, RetingMemoryUsage.2

PHP ?? ?? ? PHP ?? ?? ? Jul 18, 2025 am 04:51 AM

PHP ??? ???? ??? ??? ??? ????? ????. ??? ????? ?? ???? ??? "?? ? ?"??? "?"? ???????. 1. ??? ? ??? ??? DocBlock (/*/)? ?? ?? ??? ???? ??? ? ?? ???? ??????. 2. JS ??? ???? ?? ???? ??? ?? ??? ??? ?????. 3. ??? ?? ?? ?? ??? ???? ????? ????? ???? ?? ????? ???? ? ??????. 4. Todo ? Fixme? ????? ???? ? ? ??? ??? ???? ?? ?? ? ??? ???????. ??? ???? ?? ??? ??? ?? ?? ?? ???? ???? ? ????.

?? PHP : ??? ??? ?? PHP : ??? ??? Jul 18, 2025 am 04:54 AM

tolearnpheffectical, startBysetTupaloCalserErverEnmentUsingToolslikexamppandacodeeditor -likevscode.1) installxamppforapache, mysql, andphp.2) useacodeeditorforsyntaxsupport.3)) 3) testimplephpfile.next, withpluclucincludechlucincluclucludechluclucled

PHP?? ??? ? ???? ??? ????? ?? PHP?? ??? ? ???? ??? ????? ?? Jul 12, 2025 am 03:15 AM

PHP??? ???? ??? ?? ?? ????? ???? ??? ?? ??? ??? ?? ? ??? ??? ???? ?????. ???? 0?? ???? ?? ??? ???? ? ?? ???? ?? ?? ? ? ????. MB_SUBSTR? ?? ??? ??? ???????. ? : $ str = "hello"; echo $ str [0]; ?? H; ??? MB_SUBSTR ($ str, 1,1)? ?? ??? ??? ??? ??????. ?? ???????? ???? ??? ???? ?? ???? ?? ?? ???? ?????? ??? ????? ?? ??? ?? ??? ???? ???? ?? ????.

?? PHP ?? ??? ?? PHP ?? ??? Jul 18, 2025 am 04:52 AM

toinstallphpquickly, usexampponwindowsorhomebrewonmacos.1. ??, downloadandinstallxAmpp, selectComponents, startApache ? placefilesinhtdocs.2

See all articles