ctype_digit(string) 检查字符串里的字符是不是都是数字,是返回true,不是返回false。 转载于:https://www.cnblogs.com/jielun/p/10964952.html