Untitled
$in="2344";
if(ereg("^(-{0,1}|+{0,1})[0-9]+(.{0,1}[0-9]+)$",$in))
echo "Ok!";
else
echo "Sorry,Please input again!";
?>
很简单的嘛!
http://www.bkjia.com/PHPjc/445265.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/445265.htmlTechArticlehtml head titleUntitled/title /head body ?php $in=2344; if(ereg(^(-{0,1}|+{0,1})[0-9]+(.{0,1}[0-9]+)$,$in)) echo Ok!; else echo Sorry,Please input again!; ? br很简单的嘛! /bo...