thinkphp get get Post parameters with I method

Source: Internet
Author: User

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

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.