Can I use sublime to write php?

藏色散人
Release: 2019-10-21 11:20:17
Original
5723 people have browsed it

Can I use sublime to write php?

Can I use sublime to write php?

We can create a PHP build system in Sublime Text 3, so that it can be run quickly using the Ctrl+B command.

Set the PHP program to the environment variable, and php can be executed in any directory;

Enter sysdm.cpl through win R to open the system properties (you can also right-click on the computer -> Properties->Advanced System Configuration), select Advanced->Environment Variables, and then set the PHP executable program path to the environment variable path.

Related recommendations: "sublime introductory tutorial"

Pay attention to the use of semicolons. Separate each path with a semicolon. Note that it is an English semicolon. It is not a Chinese semicolon; check whether the php command can be used normally:

Create PHP compilation system

Add PHP build system, as shown in the figure, Tools-> ;Build System-> New Build System:

Create a new one. The default content is:

{ "shell_cmd": "make"} 修改为: { "cmd": ["php", "$file"], "file_regex": "php$", "selector": "source.php" }
Copy after login

Just save it in the default directory. Please change the file name to php.sublime-build .

Restart sublime text, you can use Ctrl B to compile the .php file; test

Just type some php code, ctrl B. If the PHP compilation system is set to ok, PHP can be compiled normally.

The above is the detailed content of Can I use sublime to write php?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!