for($i=1;$i<=$path_div;$i++)
{
try{
$res = ftp_cdup($this->conn);
if(!$res){
throw new \Exception('ftp_cdup fail');
}
}catch (\Exception $e){
/**
* :ftp_cdup(): CDUP successful. "/" is current directory
*/
if(strpos($e->getMessage(),'ftp_cdup(): CDUP successful')>=0){
//normal
}else{
throw new \Exception('ftp_cdupfail:'.$e->getMessage());
}
}
}
Exception is
ftp_cdup(): CDUP successful. "/" is current directory
In fact this is normal.