PHP上传文件

1.PHP的文件上传/资源指令

1.file_uploads=on/off

2.max_execution_time=integer

3.memory_limit=integer M

4.upload_max_filesize=integer M

5.upload_tmp_dir=string

6.post_max_size=integer M

2.$_FILES数组

1.$_FILES['userfile']['error']

2.$_FILES['userfile']['name']

3.$_FILES['userfile']['size']

4.$_FILES['userfile']['tmp_name']

5.$_FILES['userfile']['type']

3.PHP的文件上传函数

1.确定是否上传文件

bool is_uploaded_file(path)

2.移动上传文件

bool move_uploaded_file(filename,destination)

4.上传错误消息

1.UPLOAD_ERR_OK,0

2.UPLOAD_ERR_INI_SIZE,1

3.UPLOAD_ERR_FROM_SIZE,2

4.UPLOAD_ERR_PARTIAL,3

5.UPLOAD_ERR_NO_FILE,4

你可能感兴趣的:(上传文件)