uploadify上传文件失败

发布于 2024-09-10 05:07:53 字数 707 浏览 1 评论 0原文

我制作了一个小脚本,它基本上使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

喜爱纠缠 2024-09-17 05:07:53

确保您:

  • 指定正确的路径

  • 目录有权限,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 in form attribute

  • Data is coming through, check with:

    print_r($_FILES);

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文