basic php file upload system

左心房为你撑大大i 提交于 2019-12-12 02:28:34

问题


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?


回答1:


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>


来源:https://stackoverflow.com/questions/9310245/basic-php-file-upload-system

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!