2

I'm attempting to create a webpage that allows a user to upload a file from their computer, and then POST it to my server. However, whenever I'm clicking on the "submit" button on my current webpage, it instantly returns

404 Not Found. The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

Here's my HTML form

<form method="POST" enctype="multipart/form-data" action="upload.php">
<input type="file" name="myfile">
<div>
    <input type="submit" name="submit" value="Upload Now">
</div>

Here's my folder structure, if I'm misunderstanding something.

Sorry if this is a really obvious mistake, I'm very new to php

2 Answers2

2

You should put upload.php the directory where this current form file exists or you should provide absolute URL of the upload.php in form action.

Gufran Hasan
  • 8,910
  • 7
  • 38
  • 51
  • Putting `upload.php` into the directory of verify.html returns the same error. How would I go about giving an **absolute** URL under my current folder structure? –  May 20 '18 at 06:43
1

I'm a moron, I was running my website on flask which doesn't handle php.