title: ftp_mkdir(): Can't create directory: No such file or directory
body: <p>I am having trouble making remote directory using ftp.</p>
  
  <p>I am getting error as <code>Warning: ftp_mkdir(): Can't create directory: No such file or directory</code></p>
  
  <p>I am trying this way.</p>
  
  <pre><code>$connection = ftp_connect($hostname) or die('Couldn\'t connect to ftp server'); 
  $login = ftp_login($connection, $username, $password) or die('Couldn\'t log_in to ftp server');
  ftp_pasv($connection, true);
  if ($login){echo 'Connected Successfully.';}else{echo 'Cannot connect.';}
  
  $dir = '2014/04/09';
  
  
  
  if(!@ftp_chdir($connection, '/public_html/images/'.$dir)){
      $ftp_mkdir = ftp_mkdir($connection, '/public_html/images/'.$dir);
      if($ftp_mkdir){
          echo 'Remote directory created successfully';
      }
      else{
          echo 'Error creating remote directory';
      }
  }
  else{
          echo 'Remote directory exist';
  }
  </code></pre>
  
  <p>Please see and suggest any possible way to do this.</p>
  
  <p>Thanks.</p>