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

                # TP5實戰源碼 --- 命令行 在開發中 我們經常會用到處理批量任務 定時任務 統計報表等等,這時命令行是一個簡單有效的解決辦法 ### 首先在base\command目錄先建立一個命令行 類文件 Mikkle 名字你自己定 ~~~ <?php namespace app\base\command; use think\Cache; use think\console\Command; use think\console\Input; use think\console\Output; /** * Created by PhpStorm. * Power by Mikkle * QQ:776329498 * Date: 2017/6/12 * Time: 15:07 */ class Mikkle extends Command { protected $sleep = 3; protected function configure() { $this->setName('mikkle')->setDescription('Here is the mikkle\'s command '); } protected function execute(Input $input, Output $output) { while(true){ $output->writeln(json_encode($this->checkDo())); sleep($this->sleep); } } protected function checkDo(){ $state = false; $int = Cache::inc("Command",1); //這里根據查詢的緩存內容 或者時間 寫你的邏輯代碼 //---------------- // you code //-------------- return $int; } } ~~~ ### 在command配置文件中 添加上 ~~~ return [ 'app\base\command\Mikkle', ]; ~~~ ### 命令行啟動命令 * 首先進入你的項目目錄 ~~~ cd /www/web/mikkle ~~~ * 運行 think mikkle ~~~ /www/wdlinux/php/bin/php think mikkle ~~~ ![](https://box.kancloud.cn/74f961ae343f792fa5cbf9a76021e299_471x176.png) > 因為我后端開啟了服務 演示的時候就自動加2了
                  <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>

                              哎呀哎呀视频在线观看