4
我正在laravel項目中工作。我有slu url的網址。它的英語工作很好。但是,當我使用孟加拉時,它返回空。請幫我解決這個問題。Laravel str_slug不適用於unicode bangla
echo str_slug("hi there");
// Result: hi-there
echo str_slug("বাংলাদেশ ব্যাংকের রিজার্ভের অর্থ চুরির ঘটনায় ফিলিপাইনের");
// Result: '' (Empty)
確保通過PHP使用utf-8:header('Content-Type:text/html; charset = utf-8');或HTML元標記,爲了這個工作。 – shubham715
檢查此鏈接: - http://stackoverflow.com/questions/22112029/strslug-alternative-for-hindi-and-arabic-strings –