Sublime Text 3-PHP构建系统 [英] Sublime Text 3 - PHP Build System
本文介绍了Sublime Text 3-PHP构建系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为此付出了很多努力.
Struggling with this quite a bit.
尝试添加一个PHP构建系统,这就是我所拥有的:
Trying to add a PHP build system this is what I have:
{
"cmd" : ["php", "$file"],
"file_regex": "php$",
"selector" : "source.php"
}
现在,构建一个名为test.php
的文件,其中包含:<?php echo "Hello, World!"; ?>
会产生此错误:
Now, building a file called test.php
which contains: <?php echo "Hello, World!"; ?>
yields this error:
[WinError 2] The system cannot find the file specified
[cmd: ['php', 'D:\\www\\sandbox\\php\\test.php']]
[dir: D:\www\sandbox\php]
PHP肯定在我的PATH
上,并且可以通过命令行运行php test.php
.
PHP is definitely on my PATH
and running php test.php
via command line works.
有人可以在这里说些什么吗?
Can anyone shed some light here?
推荐答案
PHP.sublime-build:
PHP.sublime-build:
{
"cmd": ["C:\\php\\php.exe", "$file"],
"file_regex": "php$",
"selector": "source.php"
}
仅在php.exe("C:\ php \ php.exe")路径中存在变量.保存后,在您的PHP代码上按F7.希望对别人有帮助.
Varialble in this only path to php.exe ("C:\php\php.exe"). After save it press F7 on your php code. Hope this help somebody.
这篇关于Sublime Text 3-PHP构建系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文