如何在Sublime text中运行PHP文件

2025-05-08 11:27:35
推荐回答(1个)
回答1:

一、将PHP安装目录放如环境变量PATH

二、添加PHP的build system

1)进入如下菜单:

2)弹出内容如下:

{
"cmd": ["make"]
}

修改为:

{
"cmd": ["php", "$file"],
"file_regex": "php$",
"selector": "source.php" }

3)保存在默认的目录下即可,注意修改文件名为 php.sublime-build 。

执行快捷键为Ctrl+B。