![]() |
| ||
| Error in uploading file via ftp server i currently working on web based ftp system where this system will upload and retrieve file from ftp server in red hat linux 9.0. here is the php cording for the upload file:- 1.upload.html <html>2.upload.php <html> when i execute this code it give me the following error:- Connected to 10.1.45.21, for user sanya Warning: ftp_put(forum.txt) [function.ftp-put]: failed to open stream: No such file or directory in D:\AppServ2\AppServ\www\FTP\test\upload.php on line 32 FTP upload has failed! Can any one help me plz.. |
| ||
| Re: Error in uploading file via ftp server $source_file is just the name of the file. The file has not yet been moved to a permanent location using move_uploaded_file(). You'll have to do that first. |
| ||
| Re: Error in uploading file via ftp server i did as you said but it still does not work. here is the cording that i add in upload.php file before close the ftp connection:- // upload the file //$upload = ftp_put($conn_id,$destination_file,$source_file,FTP_ASCII ); if (move_uploaded_file($source_file, "/home/admin")) { print "Received {$_FILES['file']['name']} - its size is {$_FILES['file']['size']}"; } else { print "Upload failed!"; } |
| ||
| Re: Error in uploading file via ftp server if i use the cording below replace the cording that i post previously:- $destination_dir = 'home/admin'; $destination_file = $uploaddir . basename($_FILES['file']['name']); if (move_uploaded_file($source_file, $destination_file)) { print "Received {$_FILES['file']['name']} - its size is {$_FILES['file']['size']}"; } else { print "Upload failed!"; } it give me a successful message showing that the file upload successfully. but if i try to search the file in /home/admin dir in linux....there were no files there.is my upload file works and where do i check for the uploaded files. help me plz.. |
| ||
| Re: Error in uploading file via ftp server i success in uploading file to FTP server. i use the cording below:- $destination_dir = $_SERVER['DOCUMENT_ROOT']; $destination_file = $uploaddir . basename($_FILES['file']['name']); $upload = ftp_put($conn_id,$destination_file,$source_file,FTP_ASCII ); thank you pritaeas. |
| All times are GMT -4. The time now is 9:01 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC