从FILES Array PHP获取元素

时间:2014-03-29 18:17:53

标签: php arrays file

好的,这可能非常简单,但我无法弄清楚如何从以下数组中获取项目:以下数组来自我的$ _FILES全局。

array(1) {
  ["test"]=>
  array(5) {
    ["name"]=>
    string(8) "204.docx"
    ["type"]=>
    string(71) "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
    ["tmp_name"]=>
    string(14) "/tmp/php57NIMV"
    ["error"]=>
    int(0)
    ["size"]=>
    int(13249)
  }
}

我的目标只是通过使用像echo-_FILES [' test'] [' name']这样的东西来获取数据,但这不起作用。谢谢。

1 个答案:

答案 0 :(得分:0)

有时因为php.ini配置

max_file_size
post_max_size

不会从表单中发送值。检查你的配置