//检查年纪是否数字 if(is_numeric($_POST['year']) AND (strlen($_POST['year']==4)){ if ($_POST['year'] < 2011) { $age=2014-$_POST['year'];} else { print '<p class="error">Either you entered your birth year wrong or you come from the future!</p>'; $okay=FAlSE;} } else { // 不满足条件1,则: print '<p class="error">Please enter the year you were born as four digits.</p>'; $okay = FALSE; }以上是代码,以下是出现的问题:PHP Fatal error: Call to undefined function (strlen() in ***, 其中extension=php_mbstring.dll 关面的分号我已经去掉。PHP 5.3版本 加IIS7.5
2 回答
绝地无双
TA贡献1946条经验 获得超4个赞
(strlen($_POST['year']==4)这句当为空时,里面参数就会是空,从而导致函数失效
Warning: Wrong parameter count for strlen() in C:\AppServ\www\wocs.php on line 2
- 2 回答
- 0 关注
- 91 浏览
添加回答
举报
0/150
提交
取消