<small id='V5BZO'></small><noframes id='V5BZO'>

      <bdo id='V5BZO'></bdo><ul id='V5BZO'></ul>
    <legend id='V5BZO'><style id='V5BZO'><dir id='V5BZO'><q id='V5BZO'></q></dir></style></legend>

    <i id='V5BZO'><tr id='V5BZO'><dt id='V5BZO'><q id='V5BZO'><span id='V5BZO'><b id='V5BZO'><form id='V5BZO'><ins id='V5BZO'></ins><ul id='V5BZO'></ul><sub id='V5BZO'></sub></form><legend id='V5BZO'></legend><bdo id='V5BZO'><pre id='V5BZO'><center id='V5BZO'></center></pre></bdo></b><th id='V5BZO'></th></span></q></dt></tr></i><div id='V5BZO'><tfoot id='V5BZO'></tfoot><dl id='V5BZO'><fieldset id='V5BZO'></fieldset></dl></div>

    1. <tfoot id='V5BZO'></tfoot>

      move_uploaded_file() 无法打开流:没有这样的文件或目

      时间:2023-05-21

      <small id='iZQJo'></small><noframes id='iZQJo'>

      <i id='iZQJo'><tr id='iZQJo'><dt id='iZQJo'><q id='iZQJo'><span id='iZQJo'><b id='iZQJo'><form id='iZQJo'><ins id='iZQJo'></ins><ul id='iZQJo'></ul><sub id='iZQJo'></sub></form><legend id='iZQJo'></legend><bdo id='iZQJo'><pre id='iZQJo'><center id='iZQJo'></center></pre></bdo></b><th id='iZQJo'></th></span></q></dt></tr></i><div id='iZQJo'><tfoot id='iZQJo'></tfoot><dl id='iZQJo'><fieldset id='iZQJo'></fieldset></dl></div>
        <bdo id='iZQJo'></bdo><ul id='iZQJo'></ul>
          <tfoot id='iZQJo'></tfoot>
          1. <legend id='iZQJo'><style id='iZQJo'><dir id='iZQJo'><q id='iZQJo'></q></dir></style></legend>
              <tbody id='iZQJo'></tbody>

              1. 本文介绍了move_uploaded_file() 无法打开流:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                限时送ChatGPT账号..

                我已经完成了你的标准检查(目录是否在那里,权限设置是否足够宽松),而且我很确定我已经涵盖了你标准的愚蠢的人类技巧.这是失败的代码:

                I've done your standard checks (is the directory there, are lax enough permissions set), and I'm pretty sure I've covered your standard stupid human tricks. Here's the code that's failing:

                move_uploaded_file($_FILES['image1']['tmp_name'], "/public_html/flashsale/assets/img/products/T".$_FILES['image1']['name']);
                

                目录在那里 - 我从 FileZilla 复制了路径.我什至在 FileZilla 和 HostGator 控制面板上的文件管理器中将权限设置为 777.此代码生成两个警告:

                The directory is there - I copied the path from FileZilla. I even set the permissions to 777, both in FileZilla and in the file manager on the HostGator control panel. This code generates two warnings:

                留言:move_uploaded_file(/public_html/flashsale/assets/img/products/Tsirloin.jpg)[function.move-uploaded-file]:无法打开流:没有那个文件或目录

                Message: move_uploaded_file(/public_html/flashsale/assets/img/products/Tsirloin.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory

                消息:move_uploaded_file() [function.move-uploaded-file]:无法将/tmp/phpI5GZ3S"移动到'/public_html/flashsale/assets/img/products/Tsirloin.jpg'

                Message: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpI5GZ3S' to '/public_html/flashsale/assets/img/products/Tsirloin.jpg'

                按照这个顺序.所以,文件正在上传,目录存在并设置为777,我还能缺少什么?

                In that order. So, the file is being uploaded, the directory exists and is set to 777, what else could I be missing?

                推荐答案

                你不需要把完整的目录放到文件中.尝试从您的链接中删除 /public_html/flashsale/ 并查看它是否有效.另外文件不需要777权限,我自己上传文件到755权限的文件夹.

                you do not need to put the full directory to the file. try to remove /public_html/flashsale/ from your link and see if that will work. In addition, the file does not need to have 777 permission, I myself upload files to folders with 755 permissions.

                此外,您可以在目标目录中使用 getcwd();.该函数将为您提供移动文件所需的目录.来源

                also, you can use getcwd(); in the directory your aiming to. the function will give you the directory that you need to use for moving your file. source

                这篇关于move_uploaded_file() 无法打开流:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:使用纯 PHP 验证两个文件是否相同? 下一篇:从服务器到服务器的http传输文件

                相关文章

                最新文章

                  1. <tfoot id='LQaAN'></tfoot>
                  2. <legend id='LQaAN'><style id='LQaAN'><dir id='LQaAN'><q id='LQaAN'></q></dir></style></legend>

                    • <bdo id='LQaAN'></bdo><ul id='LQaAN'></ul>

                  3. <i id='LQaAN'><tr id='LQaAN'><dt id='LQaAN'><q id='LQaAN'><span id='LQaAN'><b id='LQaAN'><form id='LQaAN'><ins id='LQaAN'></ins><ul id='LQaAN'></ul><sub id='LQaAN'></sub></form><legend id='LQaAN'></legend><bdo id='LQaAN'><pre id='LQaAN'><center id='LQaAN'></center></pre></bdo></b><th id='LQaAN'></th></span></q></dt></tr></i><div id='LQaAN'><tfoot id='LQaAN'></tfoot><dl id='LQaAN'><fieldset id='LQaAN'></fieldset></dl></div>
                  4. <small id='LQaAN'></small><noframes id='LQaAN'>