时间只显示年月日,时间格式为2008-08-08
连接地址的话,要考虑http,https这两种情况吧,或者你有更全的更好。
分享到:
------解决方案--------------------
$s='2008-08-08';
echo $s == date(y-m-d,strtotime($s)) ? 'yes' : 'no' ;
网址的话网上搜,太多了。
------解决方案--------------------
$url = http://www.liuxingyuyuni.cublog.cn;
if(!preg_match('^(http
------解决方案--------------------
https)\:\/\/([a-za-z0-9]+\.)?([a-za-z0-9]+\.[a-za-z0-9]+)+', $url))
{
echo 'wrong';
}
else
{
echo 'ok';
}