使用Ctrl+`快捷键或者通过View->Show Console菜单打开命令行,粘贴如下代码:
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(' ',' ')).read())这是我另外一篇安装PHPstudy的博客,可以参照来做http://blog.csdn.net/post_mans/article/details/74076555
如果下载链接失效了,就去composer官网下载composer中国官网
[root@localhost bin]# wget https://dl.laravel-china.org/composer.phar -O /usr/local/bin/composer [root@localhost bin]# chmod a+x /usr/local/bin/composer ##注意如果composer没有反应,出现以下问题,就是没有把PHP添加到系统环境变量 [root@localhost bin]# composer /usr/bin/env: php: 没有那个文件或目录 ### ###安装你按装的PHP的bin目录,我自己没有用phpstudy!根据实际情况找到PHP的bin目录 ##修改/etc/profile文件使其永久性生效,并对所有系统用户生效,在文件末尾加上如下两行代码(后面继续加的要以冒号隔开) PATH=$PATH:/usr/local/webserver/php/bin: ##最后:执行 命令source /etc/profile 使其修改生效,执行完可通过echo $PATH命令查看是否添加成功。 ##然后再输入composer [root@localhost bin]# composer Do not run Composer as root/super user! See https://getcomposer.org/root for details ______ / ____/___ ____ ___ ____ ____ ________ _____ / / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/ / /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ / \____/\____/_/ /_/ /_/ .___/\____/____/\___/_/ /_/ Composer version 1.6-dev (d9885d5b3bd1b28a6d8c679df848540e565ee818) 2017-08-21 07:16:59 Usage: command [options] [arguments] Options: -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --profile Display timing and memory usage information --no-plugins Whether to disable plugins. -d, --working-dir=WORKING-DIR If specified, use the given directory as working directory. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug Available commands: about Shows the short information about Composer. archive Creates an archive of this composer package. browse Opens the package's repository URL or homepage in your browser. clear-cache Clears composer's internal package cache. clearcache Clears composer's internal package cache. config Sets config options. create-project Creates new project from a package into given directory. depends Shows which packages cause the given package to be installed. diagnose Diagnoses the system to identify common errors. dump-autoload Dumps the autoloader.