Home>Article>Development Tools> How to use the browser to open php files in sublime with one click
The following tutorial column ofsublimewill introduce to you how to use a browser to open php files in sublime with one click. I hope it will be helpful to friends in need!
Due to work needs, I need to use sublime to develop PHP. I found that every time I write the code, I need to manually enter the local host and resource path, which is too troublesome. After checking online, I summarized A method to use shortcut keys to run php files with one click
1. Search SideBarEnhancements on github and download it. Open the sublime software and select preferences->browse packages. Unzip the downloaded compressed package in the opened folder and remove the suffix (-st3)
2. Restart sublime
3. Use Sublime opens your php working path, right-click the folder in the working path--->project-->Edit preview URLs. Write the following code in the input window
{ "I:/phpworkplace/":{ "url_testing": "http://localhost:/", "url_production": "" } }
Change I:/phpworkplace/ to your phpgong working path
4. Set shortcut keys preferences-->Package Settings->side Bar-> key Bindings-User. Just write the following code in the input window
[ { "keys":["ctrl+r"], "command":"side_bar_open_in_browser", "args":{ "paths":[], "type":"testing", "browser":"chrome" } } ]
keys are followed by the shortcut keys
5. Once done, you only need to Press the shortcut key on the current file to open the php file with one click
The above is the detailed content of How to use the browser to open php files in sublime with one click. For more information, please follow other related articles on the PHP Chinese website!