因為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]
行動開發.APP開發教學.Swift開發教學.IOS開發教學.Andriod開發教學.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]