bin voll der php newbie , kann mir bitte jemand diese 2 codes zu einem zusammen fassen ??
	
							
						
					PHP-Code:
	
	
$path="kn";
function FtpMkdir($path, $id) { 
   
       $server='***'; // ftp server 
       $connection = ftp_connect($server); // connection 
   
  
       // login to ftp server 
       $user = "***"; 
       $pass = "***"; 
       $result = ftp_login($connection, $user, $pass); 
   // check if connection was made 
     if ((!$connection) || (!$result)) { 
       return false; 
       exit(); 
       } else { 
         ftp_chdir($connection, $path); // go to destination dir 
       if(ftp_mkdir($connection,$id)) { // create directory 
 
    return $id; 
       } else { 
           return false;        
       } 
   ftp_close($conn_id); // close connection 
   } 
} 
FtpMkdir($path, $id); 
$FTPServer   = "***"; 
 $FTPUser     = "****"; 
 $FTPPasswort = "***";
 
 $Dateiname = "kn/$id";
 $Rechte = "777";
 $VerbindungsID = ftp_connect($FTPServer); 
 $LoginErgebnis = ftp_login($VerbindungsID, $FTPUser, $FTPPasswort);
 
 if($VerbindungsID && $LoginErgebnis)
 {
     $Erfolg = ftp_site($VerbindungsID, "CHMOD ".$Rechte." ".$Dateiname);
     if($Erfolg)
     {}
 }
 else
 {
     echo"Es konnte keine Verbindung mit dem FTP-Server hergestellt werden."; 
 } 
          



Kommentar