分享

php替换复制的url,居然是这样处理的。

发布于:2021-03-15    评论次数:0    阅读次数:52

function dp_clearmark($str){ 
    $str=str_replace(array("~","!","@","#","$","%","^","+","&","*",",",".","?",";",":",'\'','"',"[","]","{","}","!","¥","……","…","、",",","。","?",";",":","‘","“","”","’","【","】","~","!","@","#","$","%","^","&","*",",",".","<",">",";",":","'",""","[","]","{","}","/","\","(",")","(",")","《","》",'$'),'',$str); 
    $str=str_replace(array("  ","-","_","\\","/"),' ',$str); 
    $str=strtolower(strip_tags(trim($str)));    
$str=explode(' ',$str);  
$str=implode('-',array_filter($str));
return $str;
}

php替换复制的url,居然是这样处理的。


推荐教程
查看更多

评论(0)

后面还有条评论,点击查看>>

相关教程

1

php+JAVASCRIPT 实现BLOB加密视频

2020-08-05   浏览:247

2

Thinkphp3.2.3多语言翻译以及使用百度翻译

2020-05-27   浏览:206

3

MySQL 连接的使用

2020-05-27   浏览:196

4

php - 二维数组转一维数组总结

2020-06-09   浏览:183

5

Thinkphp 3.2.3 addAll方法的坑

2020-06-30   浏览:178

6

DTCMS循环调用多级子栏目-如顶级栏目下二级、三级栏目

2020-06-04   浏览:169

7

DTCMS模板标签大全二

2020-06-04   浏览:165

8

根据经纬度 计算距离 (sql 附近商家 根据距离 筛选)

2020-06-22   浏览:159

9

DTCMS模板标签大全三

2020-06-04   浏览:155

嘿,我来帮您!