|
|
|
| |||||||||
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
FTP get file problem.
Hi ppl, I'm having problems trying to get a file from an ftp server. I can connect and view the files from the remote pc who is running the ftp server on my local machine. I am using linux by the way. But i get a warning when trying to retieve the file. The warnings are as followed:
warning: fopen(../var/lib/mysql/table1/file.txt):failed to open stream: no such file or directory in /usr/local/apache/htdocs/file.php warning ftp_fget() expecrs parameter 2 to be resource, boolean given in /usr/local/apache/htdocs/file.php warning fclose(): supplied argument is not a valid stream resource in usr/local/apache/htdocs/file.php . . . $localfile_es = "(../var/lib/mysql/table1/file.txt)"; $remotefile_es = "file.txt"; $fp_es = fopen($localfile_es, "w"); if (!$success = ftp_fget($conn_es, $fp_es, $remotefile_es, FTP_BINARY)) { echo "Error: Could not download file"; fclose($fp_es); ftp_quit($conn_es); exit; } fclose($fp_es); echo "File download successfully"; I want to store the file i download to var/lib/mysql/table1/file.txt, is my code correct, please help, thank you. Last edited by DKCUK : June 16th, 2003 at 11:55 AM. |
|
#2
|
||||
|
||||
|
You are trying to retrive the file via ftp and save it localy?
|
|
#3
|
|||
|
|||
|
yup. Can anyone help? Please!!!
Last edited by DKCUK : June 17th, 2003 at 03:35 AM. |
| Viewing: Dev Shed Forums > System Administration > FTP Help > FTP get file problem. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|