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

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

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

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

    1. PHP 错误 - 上传文件

      PHP Error - Uploading a file(PHP 错误 - 上传文件)
        <legend id='wQuI9'><style id='wQuI9'><dir id='wQuI9'><q id='wQuI9'></q></dir></style></legend>
        <i id='wQuI9'><tr id='wQuI9'><dt id='wQuI9'><q id='wQuI9'><span id='wQuI9'><b id='wQuI9'><form id='wQuI9'><ins id='wQuI9'></ins><ul id='wQuI9'></ul><sub id='wQuI9'></sub></form><legend id='wQuI9'></legend><bdo id='wQuI9'><pre id='wQuI9'><center id='wQuI9'></center></pre></bdo></b><th id='wQuI9'></th></span></q></dt></tr></i><div id='wQuI9'><tfoot id='wQuI9'></tfoot><dl id='wQuI9'><fieldset id='wQuI9'></fieldset></dl></div>

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

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

                <tbody id='wQuI9'></tbody>
            • <tfoot id='wQuI9'></tfoot>

                本文介绍了PHP 错误 - 上传文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在尝试编写一些 PHP 来将文件上传到我的网络服务器上的文件夹.这是我所拥有的:

                I'm trying to write some PHP to upload a file to a folder on my webserver. Here's what I have:

                <?php
                    if ( !empty($_FILES['file']['tmp_name']) ) {
                        move_uploaded_file($_FILES['file']['tmp_name'], './' . $_FILES['file']['name']);
                        header('Location: http://www.mywebsite.com/dump/');
                        exit;
                    }
                ?>
                
                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
                    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
                <html>
                    <head>
                        <title>Dump Upload</title>
                    </head>
                    <body>
                        <h1>Upload a File</h1>
                        <form action="upload.php" enctype="multipart/form-data" method="post">
                            <input type="hidden" name="MAX_FILE_SIZE" value="1000000000" />
                            Select the File:<br /><input type="file" name="file" /><br />
                            <input type="submit" value="Upload" />
                        </form>
                    </body>
                </html>
                

                我收到以下错误:

                警告:move_uploaded_file(./test.txt) [function.move-uploaded-file]:无法打开流:E:inetpubvhostsmywebsite.comhttpdocsdumpupload.php 中的权限被拒绝第 3 行

                Warning: move_uploaded_file(./test.txt) [function.move-uploaded-file]: failed to open stream: Permission denied in E:inetpubvhostsmywebsite.comhttpdocsdumpupload.php on line 3

                警告:move_uploaded_file() [function.move-uploaded-file]:无法将 'C:WINDOWSTempphpA30E.tmp' 移动到 E:inetpubvhostsmywebsite 中的 './test.txt'.comhttpdocsdumpupload.php 在第 3 行

                Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:WINDOWSTempphpA30E.tmp' to './test.txt' in E:inetpubvhostsmywebsite.comhttpdocsdumpupload.php on line 3

                警告:无法修改标头信息 - 标头已由 E:inetpubvhostsmywebsite.com 中的(输出开始于 E:inetpubvhostsmywebsite.comhttpdocsdumpupload.php:3)发送httpdocsdumpupload.php 在第 4 行

                Warning: Cannot modify header information - headers already sent by (output started at E:inetpubvhostsmywebsite.comhttpdocsdumpupload.php:3) in E:inetpubvhostsmywebsite.comhttpdocsdumpupload.php on line 4

                PHP 版本 4.4.7在 Windows 机器上运行 IIS.这个特定的文件/文件夹有 777 个权限.

                PHP version 4.4.7 Running IIS on a Windows box. This particular file/folder has 777 permissions.

                有什么想法吗?

                推荐答案

                因为是Windows,所以没有真正的777.如果你使用的是chmod,查看Windows相关的注释.

                As it's Windows, there is no real 777. If you're using chmod, check the Windows-related comments.

                检查 IIS 帐户是否可以访问(读取、写入、修改)这两个文件夹:

                Check that the IIS Account can access (read, write, modify) these two folders:

                E:inetpubvhostsmywebsite.comhttpdocsdump
                C:WINDOWSTemp
                

                这篇关于PHP 错误 - 上传文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                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 的问题)
              1. <small id='Uh4YA'></small><noframes id='Uh4YA'>

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

                    <tbody id='Uh4YA'></tbody>

                    <bdo id='Uh4YA'></bdo><ul id='Uh4YA'></ul>

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

                        <tfoot id='Uh4YA'></tfoot>