Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: RE: Popups and linking and upload files


Message #1 by "Joe Monteiro" <t.monteiro@c...> on Thu, 27 Jun 2002 23:19:30 +0200
This is a multi-part message in MIME format.

------=_NextPart_000_0014_01C21E31.16BE0D60
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi Greg
Herewith I send you also the latest PHP
 
<?php
// Everything we wrote up till now is above here
 
      $server = "ftp.web.com";
      $ftpFp = ftp_connect( $server );
      if (!$ftpFp) {
            echo "Couldn't connect to my FTP server: "."\"$server\"\n";
            return 1;
}else {
 
            echo "connected to my FTP server: "."\"$server\"\n";  
 }
 
      // Put the connection in passive mode.  
      // Most servers behind a firewall
      // will need this to work.
      ftp_pasv($ftpFp,true);
 
      // Log in
      $user = "xx";
      $password = "xxx";
      $loginOk = ftp_login( $ftpFp, $user, $password );
      if (!$loginOk) {
      echo "Couldn't login to FTP server using: "."\"$user\" and a
password.\n";
            return 1;
} else {
 
      echo "login into FTP server using: "."\"$user\" and a
password.\n";
       }
 
// change directory to "public_html"
ftp_chdir($ftpFp, "httpdocs/visitor");
 
print $DOCUMENT_ROOT;
// get current location
$here = ftp_pwd($ftpFp);
echo $here;
               
 
      $filename =  $here."/jo.prm";
      $remoteFilename = "c:"."/"."ce.prm";
      $uploadOk = ftp_put( $ftpFp, $remoteFilename, $filename, FTP_ASCII
);
 
      if (!$uploadOk) {
            echo "Couldn't upload to remote server!\n";
            return 1;
      }
      else { 
      unlink($filename);
      echo "File set ok!\n";
      return 0;
 
       }
 
 
 
?>
 
and I am stroglling with
 
      $filename =  $here."/jo.prm";
      $remoteFilename = "c:"."/"."ce.prm";
please I am almost there but I need the a experienced brain from
somebody
 
many thanks
joe
 
 
-----Original Message-----
From: Joe Monteiro [mailto:t.monteiro@c...] 
Sent: Thursday, June 27, 2002 11:03 PM
To: javascript
Subject: [javascript] RE: Popups and linking
 
 





  Return to Index