Bonzol Posted April 6, 2006 Share Posted April 6, 2006 I have the following code[code=php:0]<?php$uploaddir = 'ftp://username:[email protected]/public_ftp/';$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);echo '<pre>';if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n";} else { echo "Possible file upload attack!\n";}echo 'Here is some more debugging info:';print_r($_FILES);print "</pre>";?> [/code]The problem is, this appears to work, and the file appears in the ftp server, however the file has no size, its almost as though all that has happend is the file name has been copied and nothing else,,anyone got any suggestions on how to copy the file correctly?Thanx in advanced Link to comment https://forums.phpfreaks.com/topic/6710-file-upload-problem/ Share on other sites More sharing options...
Desdinova Posted April 6, 2006 Share Posted April 6, 2006 what does your print_r($_FILES); tell you?what does your upload form look like? Link to comment https://forums.phpfreaks.com/topic/6710-file-upload-problem/#findComment-24441 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.