I have been trying out with the file uploading example but i still can get it right. Ca someone help me with it? A million thanks. This is my script and consists of 2 different files:
/ A html form/
<form method="post" action="Retrieving_Files.php" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="1048576">
<input type="file" name="upFile"><br>
<input type="submit" value="Submit">
</form>
/Retrieving Files.php/
<?php
/I hve configure the php.ini, file_uploads tmp folder to F:\home\testing_folder\php
and restarted my server. However, i can't find the file when i execute the script.
/
if(! is_uploaded_file($_FILES['upFile']['tmp_name']))
{
echo "File cannot be upload";
echo '<br>';
echo $_FILES['upFile']['name'];
echo '<br>';
echo $_FILES['upFile']['tmp_name'];
echo '<br>';
echo $_FILES['upFile']['type'];
echo '<br>';
echo $_FILES['upFile']['error'];
}
else
{
echo $_FILES['upFile']['tmp_name'];
echo '<br>';
echo 'File Uploaded Successfully.';
}
?>