FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Closed Thread
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 16th, 2003, 11:27 AM
DKCUK DKCUK is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 16 DKCUK User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old June 16th, 2003, 11:51 AM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Psycho Canadian
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jan 2001
Location: Canada
Posts: 4,788 Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 4 Weeks 19 h 51 m 40 sec
Reputation Power: 437
You are trying to retrive the file via ftp and save it localy?

Reply With Quote
  #3  
Old June 16th, 2003, 11:54 AM
DKCUK DKCUK is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 16 DKCUK User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
yup. Can anyone help? Please!!!

Last edited by DKCUK : June 17th, 2003 at 03:35 AM.

Reply With Quote
Closed Thread

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > FTP get file problem.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway