note 24788 modified in function.ftp-mkdir by didou

From: Date: Sun, 18 May 2003 09:40:43 +0000
Subject: note 24788 modified in function.ftp-mkdir by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-48470@lists.php.net to get a copy of this message
<?php $ftp_server='180.10.11.12';//serverip $conn_id = ftp_connect($ftp_server); // login with username and password $user="mart";//username $passwd="575";//password $login_result = ftp_login($conn_id, $user, $passwd); // check connection if ((!$conn_id) || (!$login_result)) { echo "FTP connection has failed!"; echo "Attempted to connect to $ftp_server for user $ftp_user_name"; die; } else { echo "<br>Connected to $ftp_server, for user $user<br>"; } $serkan="gokerez"; ftp_chdir($conn_id,"www.xxx.com"); if(ftp_mkdir($conn_id,$serkan)) print ("File is created!"); ftp_close($conn_id); ?> --was-- I don't think so...you ca control whether the file is created or not... <?php $ftp_server='180.10.11.12';//serverip $conn_id = ftp_connect($ftp_server); // login with username and password $user="mart";//username $passwd="575";//password $login_result = ftp_login($conn_id, $user, $passwd); // check connection if ((!$conn_id) || (!$login_result)) { echo "FTP connection has failed!"; echo "Attempted to connect to $ftp_server for user $ftp_user_name"; die; } else { echo "<br>Connected to $ftp_server, for user $user<br>"; } $serkan="gokerez"; ftp_chdir($conn_id,"www.xxx.com"); if(ftp_mkdir($conn_id,$serkan)) print ("File is created!"); ftp_close($conn_id); ?> http://www.php.net/manual/en/function.ftp-mkdir.php

« previous php.notes (#48470) next »