我只想使用此代码(ppp secret set profile =“ NON-Payment”)而不是在此代码的最后三行中使用(/ ppp / secret / disable)。我尝试过但没有成功。请帮忙。
try {
$client = new RouterOS\Client($m['ip_address'], $m['username'], $m['password']);
} catch (Exception $e) {
die('Unable to connect to the router.');
}
$printRequest = new RouterOS\Request('/ppp/secret/print');
$printRequest->setArgument('.proplist', '.id');
$printRequest->setQuery(RouterOS\Query::where('name', $c['username']));
$id = $client->sendSync($printRequest)->getProperty('.id');
$setRequest = new RouterOS\Request('/ppp/secret/disable');
$setRequest->setArgument('numbers', $id);
$client->sendSync($setRequest);
答案 0 :(得分:0)
最后我没有任何帮助。
只需替换
'/ppp/secret/disable'
使用
'/ppp/secret/set profile="NON-Payment"'