File upload error!

+1 Bill Bob · May 21, 2015
 Ok I am having a real issue here. I am trying to allow users to upload to my site but it's simply not working.  I have followed the tutorial: 
Beginner PHP Tutorial - 87 - Uploading Files: The Basics
Beginner PHP Tutorial - 88 - Uploading Files: The Basics Part 2.

The error is:/images/forum/upload/2015-05-21/eca391eb057029e3c3617f89b3604d73.png

My site is on wordpress. I am not sure where to put the upload.php file. 
It's current location is: Wp-content/themes/"theme"/upload.php
 Wp-content/themes/"theme"/upload.file folder
My pluggin security does not effect my uploads and any settings within it are appropriate in regards to file uploads.
My code is exactly the same in the video.

I understand the error message is just saying it can't find the upload.php file and I am really unsure what to do!

Any chance of any help?


Post a Reply


Oldest  Newest  Rating
0 Logan Lohman · May 28, 2015
Is your uploads folder within your theme? As I am assuming that is where it is being uploaded to.
0 Bill Bob · May 23, 2015


echo $name =$_FILES ['file'] ['name'];
$name =$_FILES ['file'] ['size'];
$name =$_FILES ['file'] ['type'];
$tmp_name = $_FILES ['file'] ['tmp_name'];

if (isset ($name)) {
    if (!empty ($name)){

    $location ='uploads/';
        if (move_uploaded_file($tmp_name, $location . $name)) {
        echo 'Uploaded';
    } else {
                echo $location . $name;
                echo "<br>";
                echo $tmp_name;

        } else{ 
               echo 'Please choose a file.';




<form action="upload.php" method="POST" enctype="multipart/form-data">
    <input type="file" name="file"><br><br>
    <input type="submit" value="submit">
0 Ian Arbuckle · May 21, 2015
Hey there, can I have a look at your source code?
  • 1

HTML / CSS / Web Design


Discuss, share, ask, learn and teach HTML5 and CSS3.