Connecting Tech Pros Worldwide Forums | Help | Site Map

Using Ftp's in php

Member
 
Join Date: May 2007
Posts: 120
#1: Nov 12 '07
What I need to accomplish is to upload a list of databases to a ftp server every 5 minuets.

Or if it is smarter to download the files.


One problem i am encountering when just uploading one db is the db does not upload all the way. Heres the code im using,

Expand|Select|Wrap|Line Numbers
  1. $ftp_server = '10.0.0.158';
  2.  
  3. $file = 'ICaudioDefaults.db';
  4.  
  5. $conn_id = ftp_connect($ftp_server);
  6.  
  7.  
  8. ftp_login($conn_id, "anonymous", "ds");
  9.  
  10.  
  11.   ftp_put($conn_id, $file, $file, FTP_ASCII);
  12.  echo "successfully uploaded $file\n";
  13.  
  14.  
  15. // close the connection
  16. ftp_close($conn_id);
  17.  
  18.  

pbmods's Avatar
Site Moderator
 
Join Date: Apr 2007
Location: Texas
Posts: 5,435
#2: Nov 13 '07

re: Using Ftp's in php


Heya, Kardon.

What do you want your code to do? Give an example.
What is your code doing that you don't want it to do? Give an example.
What is your code *not* doing that it is supposed to? Give an example.
Reply


Similar PHP bytes