分享一些常用的代码,本帖长期更新!
本帖提供一些站长常用的一些代码,大家也可以跟帖提供,严禁放置恶意代码,违者扣分、禁言直至封禁。腾讯客服的代码:tencent://message/?uin=573839356
判断php是否有http
判断php是否有http:$source = $_SERVER['HTTP_HOST'];
if (preg_match('/(http:\/\/)|(https:\/\/)/i', $source)) {
$source = preg_replace('/(http:\/\/)|(https:\/\/)/i', '', $source);
// 去掉 h t t p: //和 h t t ps: //前缀
}
页:
[1]