Ron Piggott
2014-02-15 19:46:09 UTC
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
===
<?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