我有这个 python 脚本
b_string = pack('>hqh2sh13sh5sh3sBiiihiiiiii',
21, 0,
len(country), country,
len(device), device,
len('1.3.1'), "1.3.1",
len('Web'), "Web",
27, 0, 0,
3, 0, cid, lac,
0, 0, 0, 0)
我想将它转换为 php,这是我到目前为止所提供的
$body= pack('nln2c*n13c*n5c*n3c*Ciiiniiiiii',
21, 0,
strlen($this->_mccToCountry[$this->_mcc]), $this->_mccToCountry[$this->_mcc],
strlen($this->_device), $this->_device,
strlen('1.3.1'), "1.3.1",
strlen('Web'), "Web",
27, 0, 0,
3, 0, $this->_cellId, $this->_lac,
0, 0, 0, 0);
变量与python脚本中的变量相同,但出现此错误
PHP 警告:pack(): Type n: too little arguments in .../application/extensions/Zend-extensions/NMS/Bts.php:150
非常感谢您的帮助。