基本的php文件上传系统

发布于 2025-01-06 08:10:15 字数 884 浏览 2 评论 0原文

我正在 php 中构建文件上传/下载应用程序。我使用以下形式

<html>
<head>

    <title>Upload Index</title>
</head>

<body>
<form enctype=“multipart/form-data” action=“files.php” method=“post”>
    <p>Choose your file to upload!
  <input name="uploadedfile" type="file" />
  <input type="submit" value="Upload">
          <br />
      And what would you like to call it? <input name=“title” type=“text” />
    </p>
    <p><br />
    </p>
</form>

</body>
</html>

而不是转到“files.php”,它会将自己定向到一些奇怪的 URL...如下所示: http://project360.in/%C3%A2%E2%82%AC%C5%93files.php%C3%A2%E2%82%AC%C2%9D? uploadedfile=buglog.txt&%E2%80%9Ctitle%E2%80%9D= 知道应该做什么来解决这个问题吗?

im building a file upload/dwnload app in php..im using the following form

<html>
<head>

    <title>Upload Index</title>
</head>

<body>
<form enctype=“multipart/form-data” action=“files.php” method=“post”>
    <p>Choose your file to upload!
  <input name="uploadedfile" type="file" />
  <input type="submit" value="Upload">
          <br />
      And what would you like to call it? <input name=“title” type=“text” />
    </p>
    <p><br />
    </p>
</form>

</body>
</html>

instead of going to the "files.php" it directs itself to some weird URL...something like this:
http://project360.in/%C3%A2%E2%82%AC%C5%93files.php%C3%A2%E2%82%AC%C2%9D? uploadedfile=buglog.txt&%E2%80%9Ctitle%E2%80%9D=
any idea what should be done to fix this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冬天旳寂寞 2025-01-13 08:10:15

删除智能引号 “ ”

<form enctype="multipart/form-data" action="files.php" method="post">
    <p>Choose your file to upload!
  <input name="uploadedfile" type="file" />
  <input type="submit" value="Upload">
          <br />
      And what would you like to call it? <input name="title" type="text" />
    </p>
    <p><br />
    </p>
</form>

Remove smart-quote “ ”.

<form enctype="multipart/form-data" action="files.php" method="post">
    <p>Choose your file to upload!
  <input name="uploadedfile" type="file" />
  <input type="submit" value="Upload">
          <br />
      And what would you like to call it? <input name="title" type="text" />
    </p>
    <p><br />
    </p>
</form>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文