基本的php文件上传系统

时间:2012-02-16 11:10:44

标签: php html webserver

使用以下表单在php..im中构建文件上传/ dwnload应用程序

<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 =     任何想法应该做些什么来解决这个问题?

1 个答案:

答案 0 :(得分:5)

删除智能引用“ ”

<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>