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

    1. <small id='yRO0o'></small><noframes id='yRO0o'>

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

    2. <tfoot id='yRO0o'></tfoot>

      1. 使用 PHP 在 Windows 中设置文件权限

        Setting File Permissions in Windows with PHP(使用 PHP 在 Windows 中设置文件权限)
        1. <legend id='Ql9a2'><style id='Ql9a2'><dir id='Ql9a2'><q id='Ql9a2'></q></dir></style></legend>
            <tbody id='Ql9a2'></tbody>
          • <tfoot id='Ql9a2'></tfoot>

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

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

              • <bdo id='Ql9a2'></bdo><ul id='Ql9a2'></ul>
                • 本文介绍了使用 PHP 在 Windows 中设置文件权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个脚本可以上传 *.csv 以导入到我拥有的数据库表中,该表通过 chmod($target, 0777); 但我不能我的生活找到了解决方案来做到这一点,但在基于 Windows 的 Apache 服务器上.

                  I have a script that uploads a *.csv to import into a DB table that I have which works great in linux through chmod($target, 0777); but I can't for the life of me find the solution to do exactly this but on a Windows based Apache server.

                  其他一些帖子有人回应不要放入 0777,它应该可以工作",但对我来说情况并非如此.谢谢!

                  Some other posts have people responding "don't put in the 0777 and it should work" but that's not the case for me. Thanks!

                  推荐答案

                  感谢在我原来的帖子上留下的评论,我能够在 http://www.howyoudo.info/index.php/how-to-fix-windows-server-upload-file-inherit-permissions-error/

                  Thanks to the comment left on my original post I was able to figure it out with a little more help from http://www.howyoudo.info/index.php/how-to-fix-windows-server-upload-file-inherit-permissions-error/

                  该问题仅在您使用 PHP 上传文件时发生.当您上传文件时,PHP 会将文件发送到硬盘驱动器(对我来说是 C:WindowsTemp),然后将其复制到它是预期的目录.一旦文件进入临时目录,它被分配了该目录的权限.这问题是当 Windows 复制该文件时,它会保留临时文件目录的权限,并且不会继承您的 Web 目录的权限权限.

                  The problem only happens when you use PHP to upload a file. When you upload a file, PHP sends the file to a temporary directory on the hard drive (for me it is C:WindowsTemp) and then copies it over to it’s intended directory. Once the file has landed in the temporary directory, it is assigned the permissions of that directory. The problem is when Windows copies that file, it keeps the temporary directory’s permissions and doesn’t inherit your web directory’s permissions.

                  解决此问题的最简单方法是将您想要的 Web 目录的权限添加到临时目录中.没有必要要删除临时目录中已有的权限,只需添加Web 目录对它们的权限.换句话说,遵循这些步骤

                  The easiest way to fix this problem is to add to the temporary directory your intended web directory’s permissions. There’s no need to erase the permissions already in the temporary directory, just add the web directory’s permissions to them. In other words, follow these steps

                  1. 要更改临时上传目录的权限,请找到php.ini 文件中的upload_tmp_dir".
                  2. 设置为目录您选择的(当然在您的网络文件夹之外)或将其保留在默认(对我来说是 C:WindowsTemp).
                  3. 浏览到此文件夹并将您的网络文件夹的权限添加到其中.

                  这篇关于使用 PHP 在 Windows 中设置文件权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Appending GET parameters to URL from lt;formgt; action(将 GET 参数附加到来自 lt;formgt; 的 URL行动)
                  Forcing quot;Save Asquot; dialog via jQuery GET(强制“另存为通过 jQuery GET 对话框)
                  PHP - get certain word from string(PHP - 从字符串中获取某个单词)
                  How to debug a get request in php using curl(如何使用 curl 在 php 中调试 get 请求)
                  get a # from a url in php(从 php 中的 url 获取 #)
                  PHP - include() file not working when variables are put in url?(PHP - 将变量放入 url 时,include() 文件不起作用?)
                    <tbody id='azJOT'></tbody>

                    <legend id='azJOT'><style id='azJOT'><dir id='azJOT'><q id='azJOT'></q></dir></style></legend>
                  • <small id='azJOT'></small><noframes id='azJOT'>

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

                            <tfoot id='azJOT'></tfoot>