note 98379 deleted from function.ftp-mkdir by danbrown

From: Date: Fri, 11 Jun 2010 14:20:47 +0000
Subject: note 98379 deleted from function.ftp-mkdir by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-170057@lists.php.net to get a copy of this message
Note Submitter: groge at naver dot com ---- A slight modification to Ashus's code sets without permission. function ftp_mkdir_recursive($fid,$path,$order=1) { $dir=split('/', $path); $curpath=join('/',array_slice($dir,0,++$order)); if(!@ftp_chdir($fid,$curpath)) { @ftp_chdir($fid,'/'); if(!@ftp_mkdir($fid,$curpath)) return FALSE; } if($order<count($dir)) return ftp_mkdir_recursive($fid,$path,$order); else return TRUE; } use example : $path = '/home/test/1/2/3'; ftp_mkdir_recursive($fid,$path);

« previous php.notes (#170057) next »