mkdir recursive

Recommend this page to a friend!

      Advanced FTP client class  >  All threads  >  mkdir recursive  >  (Un) Subscribe thread alerts  
Subject:mkdir recursive
Summary:a function for creating directory recursivly on server
Date:2007-12-04 08:58:23
Update:2007-12-08 12:51:19

  1. mkdir recursive   Reply   Report abuse  
Picture of sinasalek sinasalek - 2007-12-04 08:58:23
thanks for the cool class, really helped.
i wrote a function based on your ftp class and i thought you might be interested to add it to your class.
it also make it possible to chmod created folders
function ftpMkdir($dir, $mode = 0777, $recursive = true) {
global $ftp;
if( is_null($dir) || $dir === "" ){
return FALSE;

if( $ftp->is_exists($dir) || $dir === "/" ){
return TRUE;
if( ftpMkdir(dirname($dir), $mode, $recursive) ){
$r=$ftp->mkdir($dir, $mode);
return $r;
return FALSE;

  2. Re: mkdir recursive   Reply   Report abuse  
Picture of Alexey Dotsenko Alexey Dotsenko - 2007-12-08 12:51:20 - In reply to message 1 from sinasalek
I add this function ad "mmkdir" method to my class.
Thanks for this great ideam about recursive mkdir


For more information send a message to info at phpclasses dot org.