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

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                > 在application\common\command中創建的 Hktsak類,位置看個人習慣 ,主要參考TP5手冊,重要的是下面的構造方法加載了配置數據庫文件,這樣就可以使用了 ``` <?php namespace app\common\command; use think\console\Command; use think\console\Input; use think\console\Output; use think\Db; use think\Config; class HkTask extends Command { /** * 解決不能連接數據庫的問題 * @param Input $input An InputInterface instance * @param Output $output An OutputInterface instance */ protected function initialize(Input $input, Output $output) { // 讀取數據庫配置文件 $filename = ROOT_PATH . 'config/database.php'; // echo $filename.PHP_EOL; die; Config::load($filename, 'database'); } protected function configure() { $this->setName('hk_task') // 這是設置的命令名稱 見名思意就行 ->setDescription('執行回款計劃'); } protected function execute(Input $input, Output $output) { $output->writeln('Date Crontab job start...'); /*** 這里寫計劃任務列表集 START ***/ echo '處理數據庫的業務':;//發短信 /*** 這里寫計劃任務列表集 END ***/ $output->writeln('Date Crontab job end...'); } } ``` 注冊命令行類 ``` <?php return [ 'app\common\command\HkTask', ]; ``` 命令行 使用 > `php think hk_task`
                  <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>

                              哎呀哎呀视频在线观看