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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php