traditional way to get variables$id=$_get[' ID '];//get a Get variable$name=$_post[' Name '];//Get post Variables$value=$_session[' var '];//Get Session variable$name=$_cookie[' Name '];//Get Cookie Variables$file=$_server[' Php_self '];//Get Server VariablesGet example: http://LOCALHOST/NEWS/ARCHIVE/2012/01/15$year=$_get["_url_"] [2];i method I (' Variable type. variable name/modifier ', [' Default value '],[' Filter Method '],[' Extra data source ']) get get get parameter post get post parameter param automatically determine request type get get, post or put parameter ask get request parameter put get put parameter session get$_sessionParameter Cookie Acquisition$_cookieparameter server get$_serverparameter Globals get$GLOBALS Parameterspath Gets the URL parameter for the pathinfo mode (3.2.2 new) data gets other types of parameters that need to be combined with additional data source parameters (3.2.2 new) Use example:EchoI (' post.id ');//equivalent to $_post[' id ')EchoI (' Get.name ');//equivalent to $_get[' name ')EchoI (' param.id ');//get or Post,param. can be omittedEchoI (' path.1 ');//gets the overridden URL variableI (' get.id/d ');//cast to an integer, there are several options:The parameter meaning s cast to the string type D cast to the shape type B cast to a Boolean type a cast to a casting of type F casts to floating-point type I (' Data.file1 ', ', ',$_files);//Read FileI (' get. ');//get the entire $_get arrayI (' post.name ', ' ', ' htmlspecialchars ');//$_post[' name ' is filtered using the Htmlspecialchars method, and an empty string is returned if it does not exist. This is the default filter and can be omittedI (' session.user_id ', 0);//get $_session[' user_id '] default is 0 if not presentI (' cookie. ');//get the entire $_cookie arrayI (' Server. Request_method ');//get $_server[' Request_method ']
thinkphp get get Post parameters with I method