php 整理的零碎知識點

PHP 獲取命令行的參數的函數

ps axu|grep "sync_orderinfo_new_by_hand.php"|grep -v "grep"|wc -l
php命令行的參數
$options = array(
    'deltatimes::',        // 增量同步時間, 默認120s
    'cmid::',              // 強制拉取客戶id的信息
);
$arrInput = getopt('', $options);
$arrInput = array(
    'deltatimes'    =>  intval($arrInput['deltatimes']),     // 增量時間
    'cmid'          =>  $arrInput['cmid'],                   // 強制拉取的客戶id
);

在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章