zoukankan      html  css  js  c++  java
  • tp5 接收参数

    <?php
    
    namespace appadmincontroller;
    
    use thinkController;
    use thinkfacadeRequest;
    
    class Demo extends Controller
    {
        public function login($code = '', $nickname = '', $thumb = '', $gender = '')
        {
            //第一种判断
            if (!request()->isPost()) {
                return;
            }
            //第二种判断
            if (!$this->request->isPost()) {
                return;
            }
    
            $data = $this->request->post();//第二种接受参数
            $data = input('post.');//第三种接受参数
    
            //还有两种。。。
            $code = Request::param('code');   //Facade机制调用
            $code = request()->param('code');   //助手函数
        }
    }
  • 相关阅读:
    WiFi热点
    计算器
    flask的使用
    Python logging
    串口
    C# 定时器
    C# 控件
    cookie 和 session
    文件
    Linux命令
  • 原文地址:https://www.cnblogs.com/wangyuyanhello/p/13265245.html
Copyright © 2011-2022 走看看