• <tfoot id='wMPmN'></tfoot>

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

        <legend id='wMPmN'><style id='wMPmN'><dir id='wMPmN'><q id='wMPmN'></q></dir></style></legend>

        file_put_contents - 无法打开流:权限被拒绝

        时间:2023-10-02

              <tbody id='XMQIC'></tbody>

            <legend id='XMQIC'><style id='XMQIC'><dir id='XMQIC'><q id='XMQIC'></q></dir></style></legend>

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

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

                  本文介绍了file_put_contents - 无法打开流:权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在尝试将查询写入文件以进行调试.该文件位于 database/execute.php 中.我要写入的文件是 database/queries.php.

                  I am trying to write a query to a file for debugging. The file is in database/execute.php. The file I want to write to is database/queries.php.

                  我正在尝试使用 file_put_contents('queries.txt', $query)

                  但是我得到了

                  file_put_contents(queries.txt) [function.file-put-contents]:无法打开流:权限拒绝

                  file_put_contents(queries.txt) [function.file-put-contents]: failed to open stream: Permission denied

                  我将 queries.txt 文件修改为 777,可能是什么问题?

                  I have the queries.txt file chmod'd to 777, what could the issue be?

                  推荐答案

                  尝试调整目录权限.

                  从终端运行 chmod 777 database(从包含数据库文件夹的目录)

                  from a terminal, run chmod 777 database (from the directory that contains the database folder)

                  如果 chmodd 正确,apache 和任何人都无法访问此目录.

                  apache and nobody will have access to this directory if it is chmodd'ed correctly.

                  另一件事是回显getcwd()".这将显示当前目录,如果这不是/something.../database/",那么您需要将query.txt"更改为服务器的完整路径.

                  The other thing to do is echo "getcwd()". This will show you the current directory, and if this isn't '/something.../database/' then you'll need to change 'query.txt' to the full path for your server.

                  这篇关于file_put_contents - 无法打开流:权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:PHP标准输入? 下一篇:file_exists() 的 PHP 不区分大小写版本

                  相关文章

                  最新文章

                        <bdo id='OLpFQ'></bdo><ul id='OLpFQ'></ul>
                    1. <tfoot id='OLpFQ'></tfoot>

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

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