<u>复制代码</u> 代码如下:<br>function create_slug($string){ <br>$slug=preg_replace('/[^A-Za-z0-9-]+/', '-', $string); <br>return $slug; <br>} <br>