日期:2014-05-17 浏览次数:20585 次
function checkenter($canshu){
//验证输入
$obj = new base($canshu);
$re1 = $obj->list_tables($canshu);
//如果验证不通过
if($re1 === false){
echo "The '$canshu' was not found, Please input again \n";
//再次要求输入
$canagin = enter();
//递归验证
checkenter($canagin);
}
return $canshu;
}
$result = checkenter($canshu);
var_dump( $result);