我正在尝试从服务器端验证表单数据。我感兴趣的是,用户只需用波斯文字符填写表单。
我使用的是以下代码:
$name=trim($_POST['name']);
$name= mysql_real_escape_string($name);
if (preg_match('/^[\u0600-\u06FF]+$/',str_replace("\\\\","",$name))){$err.= "Please use Persian characters!";}
但是它不起作用!
以下是一个警告:
Warning: preg_match() [function.preg-match]: Compilation failed: PCRE does not support \L, \l, \N, \U, or \u at offset 3 in C:\xampp\htdocs\site\form.php on line 38
我能做什么?
https://stackoverflow.com/questions/4621727
复制相似问题