99热,在线视频免费精品,亚洲综合视频在线观看,久久免费高清视频,九九热视频在线播放,日韩精品在线播放视频,99久久精品免费视频

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

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

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

2025.06.21 | 670閱讀 | 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ā)表評論

福清市| 宁陕县| 平泉县| 双城市| 靖西县| 图们市| 玉林市| 策勒县| 青神县| 平顶山市| 巢湖市| 藁城市| 子洲县| 徐水县| 晋江市| 山西省| 绥化市| 错那县| 博客| 蒙自县| 泊头市| 进贤县| 大名县| 东明县| 会同县| 杭锦旗| 庄浪县| 蚌埠市| 曲松县| 安图县| 喀喇沁旗| 宜黄县| 鹿邑县| 桃园市| 宁波市| 滨海县| 鹿邑县| 林州市| 南昌县| 嘉峪关市| 阿巴嘎旗|