0
我有上面的這個函數來創建url posts從帖子標題,問題是ç
characther沒有被轉換爲c
。它實際上被功能覆蓋。S URL URL生成函數覆蓋Ç
實施例交標題:科拉桑德Pelúcia
蛞蝓生成:coraao-DE-pelucia
如何解決該功能可以生成如蛞蝓:科拉桑-DE-pelucia
function generate_seo_link($input,$replace = '-',$remove_words = true,$words_array = array())
{
//make it lowercase, remove punctuation, remove multiple/leading/ending spaces
$return = trim(ereg_replace(' +',' ',preg_replace('/[^a-zA-Z0-9\s]/','',strtolower($input))));
//remove words, if not helpful to seo
//i like my defaults list in remove_words(), so I wont pass that array
if($remove_words) { $return = remove_words($return,$replace,$words_array); }
//convert the spaces to whatever the user wants
//usually a dash or underscore..
//...then return the value.
return str_replace(' ',$replace,$return);
}
seens工作正常。謝謝。 –