Home  >  Article  >  Backend Development  >  PHP code that encapsulates the get post method

PHP code that encapsulates the get post method

WBOY
WBOYOriginal
2016-07-25 08:41:59993browse
[PHP] Code nFunction G ($ name, $ defaultValue = "") {
// pHP Here distinguishes smallcatalization, turning both into lowercases
$ _Get = Array_CHANGE_KEY_CASE ($ _get, case_lower);
    $name = strtolower ( $name );
  1.                                                                   $                                                                                 $name = strtolower ( $name ); array_change_key_case ( $_POST, CASE_LOWER );
  2.                                                                                                   return $defaultValue;
  3. else
  4.                 {
  5.                         // 20141011 jc :  js_unescape($v)会引起where ( col_subject like '%123%' ) 会变成where ( col_subject like '%3%' )
  6.                         //$v =  js_unescape($v) ;
  7.                                                                                         
  8. Copy code
  9. Installed, post, PHP
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn