if (isset(preg_match("/^[\s\@\#\%]*/isU/", $testcharacter)))各位仁兄贤弟们,帮旁瞧一下吧,谢了!

解决方案 »

  1.   

    echo(preg_match("/[\s @#%\$&\*]/is",$str));
      

  2.   

    hi, Shelly: 谢谢你的关注,我的意思是想把preg_match("/[\s @#%\$&\*]/is",$str));转成一布尔值判断输入的字符串中是否含有这些标志符
    把您的代码放入其中,能判断出,可我没有输入这些标志符时,它也报错:$test = $_POST['testid'];
        $testtest=(preg_match("/[\s @#%\$&\*]/is",$test));//preg_match("/^[\s\@\#\%]/", $PID);
        echo $testtest;
        if(isset($testtest)){
           echo "<script >alert('There are maybe some specialsignalabout testid ');</script>";
           echo "<script>history.back(-1);</script>";
       }
    else....
    谢谢!