<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                #### 響應輸出 ##### 路由直接返回 添加路由響應 route/app.php ~~~php Route::get('hello/:name', function ($name) { return 'Hello,' . $name . '!'; }); ~~~ 測試與結果 ~~~bash http://127.0.0.1:8000/hello/huyongjian ~~~ ~~~undefined Hello,huyongjian! ~~~ ##### 控制器返回 控制器 ~~~php <?php namespace app\controller; class Index { public function index($name='thinkphp') { return 'hello '. $name; } } ~~~ 測試結果 ~~~perl http://127.0.0.1:8000/index?name=xiaoming ~~~ ~~~undefined hello xiaoming ~~~ ##### 方法 ~~~mipsasm 輸出類型 快捷方法 對應Response類 HTML輸出 response \think\Response 渲染模板輸出 view \think\response\View JSON輸出 json \think\response\Json JSONP輸出 jsonp \think\response\Jsonp XML輸出 xml \think\response\Xml 頁面重定向 redirect \think\response\Redirect 附件下載 download \think\response\File ~~~ #### 響應參數 設置數據 ~~~scss json()->data($data); ~~~ 設置狀態碼 ~~~scss json($data)->code(201); ~~~ 設置頭部信息 ~~~haskell json($data)->code(201)->header([ 'Cache-control' => 'no-cache,must-revalidate' ]); ~~~ 設置Cookie ~~~scss response()->cookie('name', 'value', 600); ~~~ #### 重定向 ~~~kotlin return redirect('http://www.thinkphp.cn'); ~~~ ~~~lisp return redirect((string) url('hello',['name' => 'think'])); ~~~ ~~~php <?php namespace app\controller; class Index { public function index() { return redirect('/hello')->with('name','thinkphp'); } public function hello() { $name = session('name'); return 'hello,'.$name.'!'; } } ~~~ #### 文件下載 ~~~csharp public function download() { // download是系統封裝的一個助手函數 return download('test.txt', 'text.txt'); } ~~~ ~~~kotlin // 設置300秒有效期 return download('image.jpg', 'my')->expire(300); ~~~ ~~~armasm 方法 描述 name 命名下載文件 expire 下載有效期 isContent 是否為內容下載 mimeType 設置文件的mimeType類型 force 是否強制下載(V6.0.3+) ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看