国产精品7777777,国产亚洲第一页,亚洲激情网,三级黄色在线免费观看,91男生福利,91男生福利,亚洲天堂福利

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

龍巖小程序開發(fā),龍巖分銷系統(tǒng)

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

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

在TP5中自定義hello命令

<?php

    protected function configure()

    {

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

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

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

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

    }


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

    {

        //獲取輸入的參數(shù)

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

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


        //輸出獲得的參數(shù)

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

    }


centos定時執(zhí)行

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

贊 (

發(fā)表評論

喀喇沁旗| 大同市| 定兴县| 望江县| 岗巴县| 固安县| 平度市| 济阳县| 浮山县| 庆安县| 洪泽县| 平谷区| 枣强县| 东乌珠穆沁旗| 原平市| 宁都县| 曲麻莱县| 灵台县| 和龙市| 梁河县| 保德县| 平罗县| 宝应县| 布拖县| 潞西市| 顺义区| 申扎县| 吕梁市| 丘北县| 改则县| 长宁区| 宜兰县| 定州市| 高邑县| 新乐市| 织金县| 永安市| 高邑县| 稷山县| 澄城县| 黔西|