dourun2990
dourun2990
采纳率100%
2012-10-02 15:14 阅读 43
已采纳

如何从sublime文本2中运行php项目

Is there a way to set up sublime text 2 to build (or run) a php script I'm editing?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

  • 已采纳
    duanba2001 duanba2001 2012-10-02 15:36

    You can do Tools -> Build System -> New Build System... and then edit the file like so:

    {
        "cmd": ["/path/to/some/script/that/runs/your/project"]
    }
    

    Then save it, and from your project, select Tools -> Build System -> <your new name>

    Now you can hit control-shift-b to run the script.

    点赞 评论 复制链接分享
  • drqja5919276 drqja5919276 2013-02-16 16:31

    if you are linux or mac user you can do that.

    Tools -> Build System ->New Build System

    {
     "cmd": ["php" , "$file"] 
    }
    

    It'll run your php codes on sublime text console

    here is a screenshot if you wonder how does it look like.

    enter image description here

    点赞 评论 复制链接分享

相关推荐