In some PHP built-in functions (such as mkdir), add @ to the front to block the errors thrown by the function. how can we implement the UDF? I tried thrownewException and trigger_error. they cannot be blocked by @. note: Yes. for example, I want to write a JsonFile: get () method, when the file does not exist, an error is thrown, the path is invalid, or the decoding fails, and false is returned. when the user cares about the error message, he can capture it by himself... in some PHP built-in functions (such as mkdir), add @ to the front to block the errors thrown by the function. how can we implement the UDF? I tried throw new Exception and trigger_error, but they cannot be blocked by @. note: for example, I want to write a JsonFile: get () method, if the object does not exist, an error is thrown, the path is invalid, or the decoding fails. if the object does not exist, the error is returned. if the object does not exist, the system automatically captures and processes the error message; if you do not care about the error message and only want to get the file content or false (failed), you can call the file by @ JsonFile: get () for convenience. How can I implement such a custom method (or function? Or do I have a bad idea? Is there a convenient and reasonable implementation method? 1. how to implement a custom function in PHP without throwing an error when @ is included? Introduction: in some PHP built-in functions (such as mkdir), add @ to the front to shield the errors thrown by this function from
1. 10 articles about php trigger_error () functions are recommended.
Introduction: get, post, and ajax methods can be used in JQuery to transmit data to the server. Next, we will introduce the ajax-get () method examples in jquery through this article, for more information, see
[Related Q & A recommendations ]:
Java-push "passthrough message" configuration push target
Beautifulsoup-python requests choppy during high-frequency refresh
Javascript-in angular 1.2.0 $ http. get (). success (), the error success is not defined?
Javascript-saving! About the json type in $. get ()
Android-Cainiao has doubts about sending msg by handler.
The above is how to use GET? Php GET () instance usage summary details, please pay attention to other related articles in the first PHP community!