<?php //封裝php中的單文件(圖片)上傳類 header('content-type:text/html;charset=utf-8'); class Upload{ //定義一個(gè)屬性,專門保存錯(cuò)誤信息 public static $error; //文件轉(zhuǎn)移的方法 public function uploadFile($file,$size,$path){ if(!is_dir($path)){ $this->mkPath($path); } $allow=array('image/jpeg','image/jpg','image/png','image/gif'); //首先判斷文件是否已上傳到臨時(shí)目錄 if(!is_array($file)){ Upload::$error='不是一個(gè)有效的文件'; return false; } //判斷文件是否上傳到臨時(shí)目錄成功 switch($file['error']){ case 1:
PHP? ??? ??? ??? ??????. ??? ???? ?????? ??? ? ????
? ???? ?? ???? ???? ????? ?? ???? ????? ????????. ?????? ???? ?? ??????! ? ???? ?? ???? ?? ?????? ?????. ??? ???? ???? ??? ????. ??? ??? ?? ??? ?? ??? ???? ????! ??? ?? ?? ??? ???? ????? ????. ???: admin@php.cn
?? ??

29 Jul 2016
??? ??? ????: ??? ??? ???? php ??? ??? ??? ??: ??? ??? ??? ?????. ??? ?? ??? ?????. <? //http://www.jb51.net class upLoad{ public $length //Limit file; size public $file; //? ???? ??? ??? ?? ?? ???? ????? ?? public $fileName; //?? ?? ??? public $fileSize;

29 Jul 2016
?? ??? ???: ??? ??? ??? ?? ??? ??? PHP ??? ??? ???: ??? ??? ?? ?? ??? ???? ??? ?? ? ??????.~ ~~~ ???? ??? ??? ????? JS? ???? ??? ?? ?????. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD /xhtml1-transitional.dtd">


??? ??

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

50?? ??? ??? PHP ???? ??
??? PHP ????, ??? ????? ??? ???? ?????

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