How to run php on sublime and php on sublime
Although many answers can be found at any time, I did not solve this problem smoothly.
I will write in detail steps that are easier to understand and operate.
Step 1: Configure PHP Environment Variables
1.
1. Find my computer-Properties
2. Advanced System settings
3. Environment Variables
4. Find the path in "system variables" and click Edit.
5. Change the address of the corresponding PHP. Then, confirm and confirm.
Step 2: Check whether the installation is successful
Windows + R
Enter cmd to enter
Enter php-v
Show 2 successful
Step 3: Set sublime
Find Tools-build system-new build system. On the page that appears, enter the following code:
{
"Cmd": ["php", "$ file"],
"File_regex": "php $ ",
"Selector": "source. php"
}
Save it to the default directory,
Change the file name to php. sublime-build.
Then write a simple PHP program.
Ctrl + B can be run directly.
3.