The entries in $_FILES will be stored with the name of the tag from your
HTML form.Your form element is named userfile, so the array will have the following
contents:
n The value stored in $_FILES[‘userfile’][‘tmp_name’] is the place where the
file has been temporarily stored on the web server.
n The value stored in $_FILES[‘userfile’][‘name’] is the file’s name on the
user’s system.
n The value stored in $_FILES[‘userfile’][‘size’] is the size of the file in bytes.
n The value stored in $_FILES[‘userfile’][‘type’] is the MIME type of the
file―for example, text/plain or image/gif.
n The value stored in $_FILES[‘userfile’][‘error’] will give you any error
codes associated with the file upload.This functionality was added at PHP 4.2.0. ------解决方案-------------------- tmp_name,那是个随机的文件名
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.