讓 netbeans 6.7 支援 Smarty tpl 檔案類型

  1. 開啟netbeans
  2. 點選toolbar上的Tools->Options,開出設定視窗
  3. 點選Miscellaneous
  4. 點選Files
  5. 在File Extension中下拉選單中確認沒有tpl的選項(理論上不會有)
  6. 點選New
  7. 輸入tpl
  8. 按Ok
  9. 在Associated File Type (MIME)的下拉選單選取PHP (text/x-php5)
  10. 按OK
  11. 重開netbeans
  12. 新增tpl檔案測試

注意,此步驟只是讓Smarty的tpl檔案中的HTML、CSS能夠有syntax highlight,autocomplete,但不支援Smarty的語法!


留言