Image uploading via PHP returning empty array
<p>I am unable to successfully upload an image/file to my server. The php is as follows:</p>

<pre><code>//This is the directory where images will be saved
$uploadDir = "./";
$uploadFile = $uploadDir . basename( $_FILES['photo']['name']);

//Writes the photo to the server
if(move_uploaded_file($_FILES['photo']['tmp_name'], $uploadFile)){
    echo "The file has been uploaded successfully.";
} else {
    print_r($_FILES);
}
</code></pre>

<p>I chose the directory at which this script lives, to ensure the functionality before I upload to the final directory. I want to upload photo's, and will check for file extensions later - but for now I at least need the upload functionality to work.</p>

<p>I get an empty array returned.</p>

<p>The form is as follows:</p>

<pre><code>&lt;form id="imageUploadForm" name="imageForm" enctype="multipart/form-data" action="imageController.php"&gt;
&lt;label for="photo" class="blogLabel"&gt;Upload an Image&lt;/label&gt;
&lt;input type="file" name="photo" id="imageUpload"&gt;
&lt;input type="submit" name="submit" id="imageSubmit" class="btn btn-primary" value="Upload"&gt;
&lt;/form&gt;
</code></pre>
