2014年4月11日 星期五

php 上傳檔案的相關資訊

上传档案的网页
enctype="multipart/form-data"
 action="__URL__" method="POST">
   
   
   
    Send this file: userfile" type="file" />
   
p.s. 重點
* form要加上 enctype="multipart/form-data"才能上傳檔案
* 上傳檔案的input type要設為file

接收参数阵列
档案名称
$_FILES['userfile']['name']
档案格式(image/jpeg)
$_FILES['userfile']['type']

档案大小
$_FILES['userfile']['size']

档案暂存的位置(伺服器上暂存的位置,必须要移动到正确的位置)
$_FILES['userfile']['tmp_name'] 

错误讯息
$_FILES['userfile']['error']
P.s. $_FILE['xxxxx']裡頭的xxxxx取決於你form裡頭選擇檔案input的"name"

沒有留言:

Windows關閉 SSL 2.0 與 SSL 3.0,並強制使用 TLS 1.2

Windows關閉 SSL 2.0 與 SSL 3.0,並強制使用 TLS 1.2 有一台windows server 2012 R2 主機, 被弱點掃描軟體Nessus,掃出 SSL Version 2 and 3 Protocol Detection "The re...