This one is driving e crazy since I have used the same method dozens of times over the years.
Trying to do a simple file upload (will be .pdf and .doc files but for now I have tried all types and nothing works !)
Two scripts
A form to browse and select the file from my pc.
html>
File Upload Form This form allows you to upload a file to the server.Type (or select) Filename:
and this calls the getfile.php
<?php echo "stage 1"; if ( move_uploaded_file ($_FILES['uploadFile'] ['tmp_name'], "../uploads/{$_FILES['uploadFile'] ['name']}") ) { echo '
The file has been successfully uploaded
'; } else { switch ($_FILES['uploadFile'] ['error']) { case 1: print 'The file is bigger than this PHP installation allows
'; break; case 2: print 'The file is bigger than this form allows
'; break; case 3: print 'Only part of the file was uploaded
'; break; case 4: echo 'No file was uploaded
'; break; } } ?>I get nothing except the echo of “stage 1”
Tried other versions and get messages such as
Warning: move_uploaded_file(… …): failed to open stream: No such file or directory in …getfile.php and
Warning: move_uploaded_file(): Unable to move 'C:\Windows\temp…
All points to a problem with move_uploaded_file but I cannot see why - have checked permissioning and everything else.
Using Heart Internet they are helpful in concept but don’t have an answer.
As I say I have used this method for years with no problem and just cannot see what is wrong .