uploadify上传文件失败
我制作了一个小脚本,它基本上使用 jQuery uplodify 将文件上传到动态生成的目录。它在我的本地主机上工作正常,但在我的远程测试服务器上没有任何作用。 我用 fiddler 检查了流量,注意到发出了以下警告:
警告: move_uploaded_file(/data/web/uploaded_videos/majid/file.txt): 无法打开流:没有这样的文件或目录/data/web/14/2d/81/jqeedu.tuxfamily.org/htdocs/file_upload/res/uploadify.php 上线 40
警告: move_uploaded_file(): 无法将 '/data/web/tmp/phpRHJQQx' 移动到 /data/web/14/2d/81/jqeedu 中的 '/data/web/uploaded_videos/majid/file.txt' .tuxfamily.org/htdocs/file_upload/res/uploadify.php on line 40
当我检查远程服务器的目录结构时,我看到 tmp
目录实际上位于 htdocs
之外,并且两者位于同一目录中。这是导致失败的原因吗?我应该如何纠正这个问题?
I made a small script which basically uses jQuery uplodify to upload files to dynamically generated directories. It works fine on my localhost but does nothing on my remote test server.
I inspected the traffic with fiddler and noticed the following warnings are issued:
Warning: move_uploaded_file(/data/web/uploaded_videos/majid/file.txt): failed to open stream: No such file or directory in /data/web/14/2d/81/jqeedu.tuxfamily.org/htdocs/file_upload/res/uploadify.php on line 40
Warning: move_uploaded_file(): Unable to move '/data/web/tmp/phpRHJQQx' to '/data/web/uploaded_videos/majid/file.txt' in /data/web/14/2d/81/jqeedu.tuxfamily.org/htdocs/file_upload/res/uploadify.php on line 40
When I inspect the directory structure of the remote server I see that the tmp
directory is actually outside htdocs
and both are in the same directory. Is this what is causing the failure? How should I correct this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保您:
指定正确的路径
目录有权限,chmod 为755
您已将
enctype
放入form
属性数据即将通过,请检查:
print_r($_FILES);
Make sure that you are:
Specifying the correct path
Directories have permission, chmod to 755
You have put
enctype
inform
attributeData is coming through, check with:
print_r($_FILES);