I can clearly see that the file has been uploaded to the folder using the PHP script as I can see it in the folder and I'm very puzzled as to why the FTP one is recognized but the File Upload one isn't. I can't see any difference and have used the exact same file for FTP and the upload script and it makes no difference. It's like the Upload PHP file is something
different by the time it's uploaded yet if I type a path to this folder I can browse all the images perfectly.
Anyone seen this before?
This is the PHP upload script that I use regularly and it's never given a
problem.
Code: Select all
if ($_FILES['fupload']['type'] == "image/jpeg") {
$source = $_FILES['fupload']['tmp_name'];
$target = "folder_1/folder_2/" .$_FILES['fupload']['name'];
/* strip htlm tags white and make lowercase. */
$clean = strip_tags(trim(strtolower($target)));
//strip any spaces
$clean= str_replace(' ' , '_' , $clean);
move_uploaded_file( $source, $clean ); // or die ("couldn't copy");
echo '<br><strong> File'. $clean . ' ' . 'was successfully Uploaded.</strong>';
}