Online video Lesson: http://www.kancloud.cn/tpshop/thinkphp5/220692
Request object and Response Response object
$_get, $_post, $_request, $_cookie
Call Request Object $request=request::instance ()
$this->request or request ()->url (); helper function
Input () helper function
Response format JSON XML template rendering
Page Jump Redirection
$this->success $this->error $this->redirect
<?phpnamespace app\admin\controller;use think\request;use think\controller;class index extends controller{ public function index () { return ' <style type= ' text/css >*{ padding: 0; margin: 0; } .think_default_text{ padding: 4px 48px;} a{color: #2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "century gothic", "microsoft Yahei "; color: #333;font-size:18px} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }</style><div style= "padding: 24px 48px;" >
ThinkPHP5 Study Notes (6) Request and response