
sinasalek - 2007-12-04 08:58:23
Hi,
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
<code>
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);
$ftp->chmod($dir,$mode);
return $r;
}
return FALSE;
}
</code>