In general, I personally prefer to use $ _ GET [& #039; parameter & #039;] for code writing. Is it necessary to encapsulate a function at the underlying system level, to determine whether to pass the value or whether the isset is empty or not, or when necessary, directly verify on the program page. System underlying encapsulation... in general, I personally prefer to directly use $ _ GET ['parameter'] for code writing. Is it necessary to encapsulate a function at the underlying system level, to determine whether to pass the value or whether the isset is empty or not, or when necessary, directly verify on the program page.
Is it necessary to encapsulate the underlying system? The two are more efficient @!
Reply content:
In general, I personally prefer to directly use $ _ GET ['parameter'] for code writing. Is it necessary to encapsulate a function at the underlying system level, to determine whether to pass the value or whether the isset is empty or not, or when necessary, directly verify on the program page.
Is it necessary to encapsulate the underlying system? The two are more efficient @!
I think it is necessary. First, the data sent from the front end is not secure. Second, there will be a large number of get and post requests in the entire website. If each request requires verification and security filtering, it will add a lot of complicated processes, and it is much easier to directly encapsulate a function to call it.
Many frameworks provide the function of retrieving and filtering input parameters. If you ask this question, there will not be any architecture...
Since everyone has this function, it is enough to prove that this function is more advantageous than the disadvantage.
If your framework does not contain these functions, you must filter them out.