note 98379 added to function.ftp-mkdir

From: Date: Fri, 11 Jun 2010 13:52:12 +0000
Subject: note 98379 added to function.ftp-mkdir
Groups: php.notes 
Request: Send a blank email to php-notes+get-170056@lists.php.net to get a copy of this message
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); ---- Server IP: 115.165.178.40 Probable Submitter: 112.214.116.240 (proxied: 112.214.116.240) ---- Manual Page -- http://www.php.net/manual/en/function.ftp-mkdir.php Edit -- https://master.php.net/note/edit/98379 Del: integrated -- https://master.php.net/note/delete/98379/integrated Del: useless -- https://master.php.net/note/delete/98379/useless Del: bad code -- https://master.php.net/note/delete/98379/bad+code Del: spam -- https://master.php.net/note/delete/98379/spam Del: non-english -- https://master.php.net/note/delete/98379/non-english Del: in docs -- https://master.php.net/note/delete/98379/in+docs Del: other reasons-- https://master.php.net/note/delete/98379 Reject -- https://master.php.net/note/reject/98379 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#170056) next »