警告:preg_match()[function.preg-match]:未知修饰符“-" [英] Warning: preg_match() [function.preg-match]: Unknown modifier '-'

查看:95
本文介绍了警告:preg_match()[function.preg-match]:未知修饰符“-"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将ereg to preg_match更改为将mycode更新为PHP5.3.现在我在页面上看到此警告.如何解决这个问题?

I change ereg to preg_match for update mycode to PHP5.3 . now i see this warning in my page. how to fix this ?

警告:

Warning: preg_match() [function.preg-match]: Unknown modifier '-' in C:\xampp\htdocs\share\configs\functions.php on line 2645

旧代码:

if (!ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $dateOfBirth, $regs))

新代码(PHP 5.3):

New Code (PHP 5.3):

if (!preg_match ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $dateOfBirth, $regs))

谢谢

推荐答案

您需要添加

这篇关于警告:preg_match()[function.preg-match]:未知修饰符“-"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆