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

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

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

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

2025.06.21 | 666閱讀 | 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)論

嫩江县| 巴彦淖尔市| 新郑市| 清徐县| 和龙市| 嵊泗县| 抚宁县| 河北区| 曲松县| 武威市| 莲花县| 读书| 萨嘎县| 宣化县| 曲麻莱县| 枞阳县| 开远市| 固镇县| 浦县| 崇州市| 富蕴县| 墨玉县| 平南县| 鄄城县| 靖江市| 克什克腾旗| 宜兰市| 博野县| 会东县| 锦州市| 家居| 商南县| 汶川县| 峡江县| 平和县| 青阳县| 伊宁县| 娱乐| 沂南县| 民和| 新巴尔虎右旗|