<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 中设置文件权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                    <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>