Sublime 配置直接Ctrl + B运行php代码

1. 运行Sublime Text,选择Tool——>Build System——>New Build System(如下左图),在新弹出的窗体中,把默认内容({ “shell_cmd”: “make”} 替换成 

{

    "cmd": ["D:\\BtSoft\\WebSoft\\php\\7.0\\php.exe", "$file"], 

    "file_regex": "php$",   

    "selector": "source.php" 

}

image.png


(上面标红的地址,请自行更换为你电脑的php执行地址)


保存在默认的目录下即可,注意修改文件名为 php.sublime-build 。重启sublime text,就可以用Ctrl+B来编译.php文件了;

PS:必须保存文件后,才能进行ctrl + B 进行编译。


发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

Powered By Z-BlogPHP 1.5.2 Zero

 Theme By 优美尚品

Copyright Your WebSite.Some Rights Reserved.