You are here

Add new comment

Error message

The spam filter installed on this site is currently unavailable. Per site policy, we are unable to accept new submissions until that problem is resolved. Please try resubmitting the form in a couple of minutes.

only two mistakes on the code... one ; missing and one ) repeated

function mkdir_ftp($directory) {
global $ftpuser,$ftppass,$ftpmkdir,$ftpdir;
$directory = $ftpdir . $directory;
$ftpConn = ftp_connect($_SERVER['use your server name here']);
if(false == ftp_login($ftpConn,$ftpuser , $ftppass)) {
watchdog('file system',
'The directory cannot be created, ftp_login() failed.',
return FALSE;
foreach($list as $ldir){
if ($first)
ftp_mkdir($ftpConn, $directory);
ftp_chmod($ftpConn, 0777, $directory);
return TRUE;

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.