Re: ftp_chdir notice error
| From: | Maciek Sokolewicz | Date: | Sun, 16 Feb 2014 10:58:33 +0000 |
| Subject: | Re: ftp_chdir notice error | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-322895@lists.php.net to get a copy of this message | ||
On 16-2-2014 6:58, Jigar Dhulla wrote:
"@" in the beginning of the function like *@ftp_chdir();* should suppress the warning. Or you can use error_reporting(); error_reporting(E_ERROR | E_PARSE); should suppress the warning too. This is a really *BAD IDEA* (tm), you should always try to resolve an error rather than just ignoring it. Good code almost never contains the error-suppression operator (@).On a sidenote, your error_reporting line is faulty. It's impossible to stop E_PARSE errors from being displayed by adding an error_reporting line inside a PHP script. This is simply because PHP first parses the script (and immediately throws an E_PARSE error); and only if it has no errors will it execute it and run your error_reporting line. In other words: by the time it runs the error_reporting line, it's already to late (although in practice with an E_PARSE error it will never even reach that point). - Tul