CodeIgniter does not work — CodeIgniter 不能 顯示 $name入面的內容

今日在學習CodeIgniter 時 嘗試隨著 CodeIgniter的教學建立一些 Sample Website 但不知道為什麼用 <?=$name?>

不能顯然 $name 的內容, 最後發現原來是 一些 Config 的問題

解決方法: 打開你的 CodeIgniter 檔案夾 到systemapplicationconfig 開啟: config.php 之後找 $config[‘rewrite_short_tags’] 如果設定為FALSE 的話 就會用不到這個功能的 只要把設定改到好像下面一樣便可 $config[‘rewrite_short_tags’] = TRUE;

Hope you find it useful

Chi Yau
Chi Yau
Software Engineer

Interested on Learning new stuff and experience sharing