Heim >php教程 >php手册 >PHP 上传文件错误 Error 代码

PHP 上传文件错误 Error 代码

WBOY
WBOYOriginal
2016-06-06 20:12:511689Durchsuche

默认表单带文件上传时 留空,会出现UPLOAD_ERR_NO_FILE 4错误代码。 PHP 错误代码列表 // UPLOAD_ERR_OK Value: 0// There is no error, the file uploaded with success.// UPLOAD_ERR_INI_SIZE Value: 1// The uploaded file exceeds the upload_max_files

默认表单带文件上传时 留空,会出现UPLOAD_ERR_NO_FILE 4错误代码。

PHP 错误代码列表

// UPLOAD_ERR_OK         Value: 0
// There is no error, the file uploaded with success.
// UPLOAD_ERR_INI_SIZE   Value: 1
// The uploaded file exceeds the upload_max_filesize directive in php.ini.
// UPLOAD_ERR_FORM_SIZE  Value: 2
// The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.
// UPLOAD_ERR_PARTIAL    Value: 3
// The uploaded file was only partially uploaded.
// UPLOAD_ERR_NO_FILE    Value: 4
// No file was uploaded.
// UPLOAD_ERR_NO_TMP_DIR Value: 6
// Missing a temporary folder. Introduced in PHP 4.3.10 and PHP 5.0.3.
// UPLOAD_ERR_CANT_WRITE Value: 7
// Failed to write file to disk. Introduced in PHP 5.1.0.
// UPLOAD_ERR_EXTENSION  Value: 8
// A PHP extension stopped the file upload. Introduced in PHP 5.2.0.

注意到上传错误代码为0,即表示上传成功。

(...)
Read the rest of PHP 上传文件错误 Error 代码 (178 words)


© Li Xi for LixiPHP, 2014. | Permalink | No comment | Add to del.icio.us
Post tags:

Feed enhanced by Better Feed from Ozh

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn