Home > Article > Development Tools > How to run php in sublime test
There are several ways to run PHP in Sublime Text: execute directly, use the terminal, or install an extension. Execute directly: Open the PHP file and select the PHP build system, then press Ctrl B (Windows) or Command B (Mac). Using the terminal: Open the integrated terminal, navigate to the file directory and execute php [PHP filename]. Install an extension: Use an extension such as PHP Companion or PHP Syntax Checker and use the shortcut keys (Alt F5, Option F5 or Ctrl Alt P, Comm
How to use Sublime Text to run PHP
Execute directly
Ctrl
B
(Windows) or Command
B
(Mac) to run the build. Use Terminal
Ctrl
~
(Windows) or Command
~
(Mac) Open the integrated terminal. cd
command to navigate to the directory containing the PHP files. <code>php [PHP 文件名]</code>
Use extensions
You can use the extension of Sublime Text to simplify PHP Run. For example:
If you have these extensions installed, you can run PHP scripts using the following shortcut keys:
Alt
F5
(Windows) or Option
F5
(Mac)Ctrl
Alt
P
(Windows) or Command
Option
P
(Mac)Based on Your needsChoose the operating method that best suits you.
The above is the detailed content of How to run php in sublime test. For more information, please follow other related articles on the PHP Chinese website!