Home > Article > Development Tools > How to install php plug-in in sublime2?
How to install the php plug-in in sublime2: 1. Use "Ctrl shift p" to open package control; 2. Enter "install Package" and press Enter; 3. Enter "php" in the search box and select it in the drop-down box Click on the php plug-in that needs to be installed and install it.
Install the php plug-in in sublime2
1. Install package control
Newly installed sublime does not have this option. Follow the steps below to install the package control tool.
sublime text2 as an example, open the editor, Ctrl ` (the key to the left of 1) to bring up the command line, paste the following code:
import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')
sublime text3
import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())
Press Enter , restart the editor.
2. Open package control (shortcut key Ctrl shift p)
3. Enter install Package and select install Package
4. Search for PHP, click on the plug-in that needs to be installed, and install it.
The above is the detailed content of How to install php plug-in in sublime2?. For more information, please follow other related articles on the PHP Chinese website!