在sublime-text中配置php的编译环境非常简单,只需要新建一个build system就可以了
步骤:
1. 工具->编译系统->新编译系统,将默认的内容替换为如下代码:蓝字部分替换成自己的php路径,反斜杠(\)需要转义,正斜杠(/)不需要
{
"cmd": ["php", "$file"],
"file_regex": "php$",
"path":"D:\\xampp\\php",
"selector": "source.php"
}
保存到默认路径,名称为:php.sublime-build
2. 新建php文件,test.php
<?php
echo "php编译成功!";
?>
3.Ctrl+B编译,编译成功,会在控制台打印出内容。
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQsAAACrCAIAAAD+XC5fAAAcdElEQVR4nO2da1RTV77A97c7M0py8sBnLW20JDw1PEJAAkJbSw10jIoP2tFaH1ismDsV7PR2rgotpXYWtkynK3at27lrjWs+jLReF+3Mylp3lYtgDa9qaXtL5O0D8doKOUkg6Hy4H3Zycl5JTjAhUf5n/T4cTvbZ52Sf/Tv//TjkoFOn/7PB9OcG0597en9ISsv6+393AwBAgd7/4yfvf/TJ+x990n2lNyE1fRIWWGChLaiu4SNMR8+Vp5JWy+QSOTBviQXYoJqTp2rea6h5r8HS1bNSlSyXS+Sx0lhgfrIIYIOOvfP+sbr3j9W9f6mz+4n4BLm7mGTRjDxWCoSDMIm3aJFsFkT+fhErjY2Vot/X1mMudnTGrVLGxkpjZ/V95gbuF5DLgdDhU56gGyfcm/GixTKB0Pea3dFD2cp6q+bdt2re/beauouWzsdXxscuki5aJPSbzCW8pSaTS2RyAohKqEoWhCfMq4wvMSGTE1JZxEBvnngHc9HS8bjiqeg0hOWGTE5IpCIxESMmYsRiIBohiBiCEEmlYrlcwmprLV4s54XVWJDLJTIZIRbHxMQsiIlZsHBhZEC/O/EOpt3SsSIqDWHcVOQSiUQkJkRK5aqcHM26At1zRYVAFLKuQJeTo1EqVxGESCIRy+WBJfG4IYuNlcpkErE4RiwWpaenGQwbd+58af/+vRHhoTEEt6kIiejxuMcKCnXrnyvU6bRZ2nRNlhqIQrK06Tqddv1zhQWFusfjHmNJ4ieAUHq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