<?php if(!preg_match('/^([1-9][0-9]*){1,10}$/',$buy_sku)) { $error['content'] = '请检查库存格式'; echo json_encode($error);die; } ?>