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

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

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

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

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

阜新市| 喜德县| 石嘴山市| 新野县| 繁昌县| 镇安县| 大庆市| 台中市| 正宁县| 四会市| 宝丰县| 扬中市| 红桥区| 清涧县| 成都市| 赣榆县| 洪江市| 大同县| 双辽市| 福海县| 色达县| 普格县| 肃宁县| 衡东县| 云霄县| 奎屯市| 深州市| 象州县| 长岭县| 平原县| 荃湾区| 昭觉县| 扶风县| 灵武市| 文登市| 武义县| 县级市| 阳朔县| 高安市| 永福县| 特克斯县|