99麻豆久久久国产免费福利精品,国产精品成人国产乱,玖玖操,手机看片169,国产精彩视频在线观看,午夜亚洲福利视频,国产伦乱视频

龍巖易富通網(wǎng)絡(luò )科技有限公司

龍巖小程序開(kāi)發(fā),龍巖分銷(xiāo)系統

centos 定時(shí)執行 think命令

2025.06.21 | 25閱讀 | 0條評論 | php

在TP5中自定義hello命令

<?php

    protected function configure()

    {

        $this->setName('hello')                      //定義命令的名字

        ->setDescription('This is my command')     //定義命令的描述

        ->addArgument('name')                      //增加一個(gè)名字參數

        ->addArgument('age');                      //增加一個(gè)年齡參數

    }


    protected function execute(Input $input, Output $output)

    {

        //獲取輸入的參數

        $name = $input->getArgument('name');

        $age = $input->getArgument('age');


        //輸出獲得的參數

        $output->writeln("My name is $name ,age is $age");

    }


centos定時(shí)執行

* * * * *  php /path/to/your/project/think hello

贊 (

發(fā)表評論

凉山| 七台河市| 津南区| 凤台县| 孙吴县| 亚东县| 象山县| 金溪县| 丰原市| 平凉市| 宣汉县| 沙田区| 馆陶县| 涞水县| 景德镇市| 宜黄县| 西青区| 中西区| 仙桃市| 福鼎市| 宜兰市| 石棉县| 保德县| 武汉市| 图片| 乐清市| 苍溪县| 额敏县| 建平县| 班玛县| 额敏县| 六安市| 根河市| 雷波县| 枣庄市| 卓资县| 宿迁市| 英山县| 嘉义县| 凤翔县| 仪征市|