时间:2021-07-01 10:21:17 帮助过:5人阅读
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);