php - 为什么我的 tmp_file_upload 文件不存在?我正在使用 php 5.6

标签 php mysql database

我正在尝试让网站上传图像,但收到此错误:

[Fri Oct 23 21:42:30.075831 2015] [:error] [pid 18652] [client ::1:64412] PHP Warning:move_uploaded_file(): Unable to move '/private/var/tmp/php0HlxVu' to 'images/photo.jpg' in /Users/ridgefrancis/Sites/examples/ch05/initial/guitarwars/addscore.php on line 32, referer: http://localhost/~ridgefrancis/examples/ch05/initial/guitarwars/addscore.php

我已经在这里看到了这个问题的解决方案:
move_uploaded_file gives "failed to open stream: Permission denied " error after all configurations i did

在尝试按照这些说明解决问题时,我遇到了另一个问题,

tmp_file_upload file/folder doesn't exist. 

遇到这样的情况我该怎么办?

提前致谢!

最佳答案

我以为我的上传由于我的 tmp_file_upload 文件夹而无法正常工作,但事实并非如此。我在网上搜索了一下,发现 ppl 说是因为那个文件夹的原因。

这段代码解决了我的问题。

sudo chmod -R a+w /PATH/TO/IMAGE/FOLDER

我希望它能帮助以后遇到同样问题的人。

关于php - 为什么我的 tmp_file_upload 文件不存在?我正在使用 php 5.6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33314602/

相关文章:

PHP/MySQL : Is it possible to add one to the field without selecting from db?

javascript - 如何在php中将数据插入到现有的html表中?

c# - 无法使用 Entity Framework 5 从数据库中读取

PHP FFmpeg 无法在 windowsxp 和实时网站上运行,在 ubuntu 中运行相同的代码

php - 我如何在 php 中使用 fetchAll?

php - 每当数据库更新时,socket.io 都会推送数据

mysql - 如何将 bash 命令的变量值输入 MySQL?

php - 在 1 个查询 php/mysql 中获取结果和子结果

mysql - MySQL中列的长度

mysql - 运行 MongoDB 所花费的时间