句子中有一些符号 比如句号 ., ‘’等都不能存在于 url 中,那么如何去掉这些非法字符呢?目前用的笨办法,全部用 str_replace 替换掉,有现成的函数或者类吗?
比如 Decision making, after the fact 这句,转换到 url 中就是 decision-making-after-the-fact.html 去掉一些非法字符
比如 Decision making, after the fact 这句,转换到 url 中就是 decision-making-after-the-fact.html 去掉一些非法字符