平常一般寫java代碼,有時也搗騰一下php,原來安裝過zend studio來編寫php代碼,無奈電腦越來越卡,於是卸載了zend,然後在myeclipse中安裝phpeclipse這款插件來完成php的編寫。
phpeclipse下載
phpeclipse下載地址:http://sourceforge.net/projects/phpeclipse/
AEZO.CN備份下載:http://download.csdn.net/detail/oldinaction/9397234
phpeclipse安裝
至於如何安裝插件請移步http://blog.csdn.net/oldinaction/article/details/50487498
注意:使用link方式安裝時不需要site.xml
自動提示配置
(1) 打開 Eclipse 的 Window -> Preferences -> PHPeclipse -> PHP -> Code Assist 打 開裏面的Enable auto activation選項,下面有個Auto activation triggers for PHP,後面的默認值 是 “$>”,隨便改一下,比如改成abcd,然後 Apply, OK
(2) 導出當前的首選項配置文件:打開 Eclipse的 File -> Export,在窗口中展 開 General -> Perferences-->Export all然後點擊 NEXT。然後點擊"Browse"選擇任意的一個 路徑,保存配置文件,然後點擊"Finish"
(3) 用記事本打開剛纔保存的那個配置文件(擴展文件名:*.epf), 按"ctrl + F",輸入剛纔輸入的“aaaa”,前面有字符串"contentAssistAutoactivationTriggersPHP"(或者可能是content_assist_autoactivation_triggers_php)。把"abcd"(這是剛纔輸入的值,即=號後面
的值)修改爲"$:>.abcdefghijklmnopqrstuvwxyz( '(即代碼中輸入上述所有符號後都會自動代碼提示,因爲 Eclipse默認只允許輸入4個自定義字符,所以這樣做能繞過這個限制),然後保存,退出記事本
(4) 重新導入修改後的首選項配置文件:打開Eclipse的 File -> Import 然後在打開的窗口裏展開 General -> Perferences,點擊NEXT,選中剛纔修改過的配置文件,Finish
(5) 重啓Eclipse就可以用了
其他配置
(1) window-open perspactive-選擇php窗口
(2) myeclipse -> window->preferences -> phpeclipse ->XDebug 下面配置php.exe的目錄
(3) myeclipse -> window->preferences -> phpeclipse -> php external tools->下面配置apache mysql 目錄
(4) 關閉單詞詞法檢測。PHPeclipse—PHP—Spelling.右側會看到一個複選框在Comments下面,直接勾選上即可。
(5) 如字體等配置和myeclipse的java配置類似