Does the custom model in thinkphp get the value of the address bar get?

Source: Internet
Author: User
The method of invoking the custom model in the controller just calls the method in model
No access to the model why can get to the address bar parameters?

I (' get.xxx ') with TP comes with a method that can get to the

Reply content:

The method of invoking the custom model in the controller just calls the method in model
No access to the model why can get to the address bar parameters?

I (' get.xxx ') with TP comes with a method that can get to the

$_get is a global predefined constant that can be accessed anywhere in the PHP program, and it is important to note that it is not recommended to get such parameters directly from the environment in the framework, and you should use the framework-defined method to get

One problem is why the controller does not pass parameters to the model
and a little bit. If you don't get a value in the model you can only indicate that your file is wrong, or that the statement was skipped by the conditional statement.

tp3.2 can use I ("Get.name") to get to the name value
5.0 using the input class to specify the method to get the feeling you basically do not use the 5.0 version is not explained in detail

  • 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.