note 51882 added to function.mkdir

From: Date: Wed, 13 Apr 2005 18:59:11 +0000
Subject: note 51882 added to function.mkdir
Groups: php.notes 
Request: Send a blank email to php-notes+get-87974@lists.php.net to get a copy of this message
Add permission using CHMOD in the above mentioned // create directory through FTP connection function FtpMkdir($path, $newDir) { $server='ftp.server.com'; // ftp server $connection = ftp_connect($server); // connection // login to ftp server $user = "me"; $pass = "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, $newDir)) { // create directory ftp_site($connection, "CHMOD 777 $path/$newDir") or die("FTP SITE CMD failed."); return $newDir; } else { return false; } ftp_close($connection); // close connection } } FtpMkdir("path","dir"); ---- Manual Page -- http://www.php.net/manual/en/function.mkdir.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51882 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51882&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51882&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51882&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51882&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51882&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51882&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#87974) next »