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