Handle ftp_put warnings in PHP 4

134 Views Asked by At

In an ideal world I would use a try/catch block to handle warnings from ftp_put, but sadly I have to use PHP 4 for legacy reasons, which does not have this. I am handling the basic true/false with an IF as below. Does anyone know how to handle warnings from this?

if (ftp_put($connection, $fileName, $file, FTP_ASCII)){
    //tell them it worked
}else{
   //fail
}
0

There are 0 best solutions below