substr

UPS跟踪号校验代码

每个快递公司生成的单号大部分带自校验功能。下面的代码实现对UPS单号的正确性校验 function validUPS($tr){ $tr = strtoupper(trim($tr)); if (strlen($tr) == 11) { $checknumber = 100 - (substr($tr,1, 1) + substr($tr,3, 1) + substr($t