ftp_chdir notice error

From: Date: Sat, 15 Feb 2014 19:46:09 +0000
Subject: ftp_chdir notice error
Groups: php.general 
Request: Send a blank email to php-general+get-322887@lists.php.net to get a copy of this message
I am using the result of “ ftp_chdir “ to know if the directory exists or not. If the result is “false” then I make the directory: === <?php if ( ftp_chdir( $this->getFtpConnection() , $new_directory ) == FALSE ) { if ( ftp_mkdir( $this->getFtpConnection() , $new_directory ) ) { return TRUE; } else { return FALSE; } } else { return TRUE; } ?> === However when the result is ‘false’ a PHP warning is created: “ PHP Warning: ftp_chdir(): Failed to change directory “ How can I avoid this warning? Ron Ron Piggott www.TheVerseOfTheDay.info

« previous php.general (#322887) next »