Home  >  Article  >  Backend Development  >  php如何用正则表达式判断连接和时间是否合法。

php如何用正则表达式判断连接和时间是否合法。

WBOY
WBOYOriginal
2016-06-23 14:21:44864browse

时间只显示年月日,时间格式为2008-08-08
连接地址的话,要考虑http,https这两种情况吧,或者你有更全的更好。


回复讨论(解决方案)

这里也看到你的帖子

echo date('Y-m-d H:i:s',strtotime($time));

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn