php & html form 上传

来源:互联网 发布:网络贩毒成因 编辑:程序博客网 时间:2024/05/18 00:55
<form action="" method="post" enctype="multipart/form-data">
<input type="file" name="test"/>
<input type="submit" />
</form>
<?php
var_dump($_FILES );

result like:
array
  'test' =>
    array
      'name' => string '1.txt' (length=5)
      'type' => string 'text/plain' (length=10)
      'tmp_name' => string 'D:\wamp\tmp\phpCF7B.tmp' (length=23)
      'error' => int 0
      'size' => int 4
原创粉丝点击