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

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

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

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

2025.06.21 | 325閱讀 | 0條評(píng)論 | php

在TP5中自定義hello命令

<?php

    protected function configure()

    {

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

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

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

        ->addArgument('age');                      //增加一個(gè)年齡參數(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定時(shí)執(zhí)行

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

贊 (

發(fā)表評(píng)論

威海市| 微博| 汨罗市| 延庆县| 青阳县| 松原市| 杂多县| 五家渠市| 安仁县| 武陟县| 天全县| 宜兰市| 宜昌市| 尉犁县| 沁阳市| 乐山市| 遂平县| 璧山县| 新竹县| 木兰县| 永泰县| 健康| 天镇县| 华坪县| 安化县| 名山县| 苍山县| 龙岩市| 长宁县| 屯昌县| 额尔古纳市| 齐河县| 阳谷县| 昌都县| 金塔县| 南阳市| 双鸭山市| 龙井市| 绥芬河市| 福安市| 马尔康县|