分享

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

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

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计算工作日天数结束日期、计算两日期之间的工作日天数

2021-05-02   浏览:636

2

DTCMS伪静态自定义操作怎么搞的?

2021-03-15   浏览:522

3

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

2021-03-15   浏览:380

4

php设置cookie,在js中如何获取

2021-03-29   浏览:353

5

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

2020-05-27   浏览:332

6

php+JAVASCRIPT 实现BLOB加密视频

2020-08-05   浏览:330

7

php利用iframe实现无刷新多图上传

2021-03-15   浏览:324

8

html页面添加水印

2021-04-07   浏览:313

9

DTcms手机站ajax调用api接口使用方法

2021-03-15   浏览:307

嘿,我来帮您!