>Move_uploaded_file() 在 Google Compute Engine 上不起作用,没有错误(它适用于其他虚拟机):
CentOS 7.2/灯
只需移动到Google Compute Engine,Move_uploaded_file()就不再工作了。
防火墙已关闭,文件夹 www 和 tmp 为 777
这是我的代码:
$uploads_dir = "./photo";
$tmp_name = $_FILES["photo"]["tmp_name"];
$file_name = $photo_name.".jpg";
move_uploaded_file($tmp_name, "$uploads_dir/$file_name");
非常感谢任何建议。
刚刚通过禁用 selinux 解决。