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
);
![](https://img.laitimes.com/img/9ZDMuAjOiMmIsIjOiQnIsIyZwpmL0cjNwMTNzETMxMDMxkTMwIzLc52YucWbp5GZzNmLn9Gbi1yZtl2Lc9CX6MHc0RHaiojIsJye.jpg)