Home >Backend Development >PHP Tutorial >Install php-mode under MAC emacs, emacsphp-mode_PHP tutorial
On a certain page (sorry I can’t remember), I compared three configurations, php-mode, php- mode-improved, xnhtml.
The author recommends xnhtml after comparison, but the download link on the xnthml official website keeps showing 403, which is really speechless.
Try to install php-mode-improved. After downloading, follow the instructions in the code but the configuration is unsuccessful. (require 'php-mode) I put it in lisp.
The only option was to change direction and install php-mode. I found http://melpa.org/#/getting-started on this page. Tip: First add MELPA to the package list, and then add it to .emacs, as follows
<code>(require 'package) ;; You might already have this line (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) (when (< emacs-major-version 24) ;; For important compatibility libraries like cl-lib (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))) (package-initialize) ;; You might already have this line</code><br /><br />可以使用m-x list-package,也可以使用options中的package管理器来安装php-mod.之后选择php-mode安装即可。