Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

PHP: Uploader un fichier via FTP

 ftp
{filelink=15345}

<?php
$connexion = ftp_connect ( "ftp.mondomaine.com" );
if ($connexion)
{
  $identification = ftp_login ( $connexion, "username", "passeword" );
  if ($identification)
  {
  // Je suis maintenant connecté
    if (ftp_chdir ( $connexion, "php" ))
    {
    // J''ouvre le répertoire PHP
      ftp_put ( $connexion, "index.txt", "index.txt", FTP_ASCII );
    }
  }
  ftp_close ( $connexion );
}
?>

No comments yet.

Leave a Comment