因為CodeIgniter有優美的uri顯示方式,很適合實作像Wordpress的slug功能。那實作方式也很簡單~
[php]
welcome.php
public function view($slug){
$slug=urldecode($slug);
echo $slug;
}
[/php]
[php]
rotes.php
$route[‘(:any)’] = ‘welcome/view/$1’;
[/php]
大型網站架構..net 架構師.rabbitMQ.redis.行動開發.APP開發教學.PHP Laravel開發..net core C# 開發.架構師之路.Delphi開發.資料庫程式.進銷存.餐飲POS系統
因為CodeIgniter有優美的uri顯示方式,很適合實作像Wordpress的slug功能。那實作方式也很簡單~
[php]
welcome.php
public function view($slug){
$slug=urldecode($slug);
echo $slug;
}
[/php]
[php]
rotes.php
$route[‘(:any)’] = ‘welcome/view/$1’;
[/php]