我使用centos os构建一个Web服务器,我上传了一个joomla源代码。
网站运行正常!但是当我上传文件时,我可以获得一些文件$_FILE["name"]["tmp_name"]
,有些文件我无法获得$_FILE["name"]["tmp_name"]
我不知道原因。
EXP:
$attachment = $_FILES['upload'];
echo "<pre>";
print_r($attachment);
输出: 在centos os:
Array
(
[name] => Array
(
[0] => myfile.zip
[1] =>
[2] =>
[3] =>
[4] =>
[5] =>
)
[type] => Array
(
[0] => //cannot get
[1] =>
[2] =>
[3] =>
[4] =>
[5] =>
)
[tmp_name] => Array
(
[0] => //cannot get
[1] =>
[2] =>
[3] =>
[4] =>
[5] =>
)
}
窗口上的:
Array
(
[name] => Array
(
[0] => myfile.zip
[1] =>
[2] =>
[3] =>
[4] =>
[5] =>
)
[type] => Array
(
[0] => application/octet-stream
[1] =>
[2] =>
[3] =>
[4] =>
[5] =>
)
[tmp_name] => Array
(
[0] => C:\wamp\tmp\phpC2D7.tmp
[1] =>
[2] =>
[3] =>
[4] =>
[5] =>
)
}
感谢收看!
答案 0 :(得分:0)
检查php.ini以确保您有文件的临时路径。
upload_tmp_dir = [something or commented out to accept a server default]