How to Use GET? PhpGET () instance usage summary

Source: Internet
Author: User
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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.