Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run a php project from within sublime text 2

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

like image 258
user1592380 Avatar asked Oct 02 '12 15:10

user1592380


2 Answers

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

like image 168
Anar Bayramov Avatar answered Oct 07 '22 01:10

Anar Bayramov


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.

like image 35
Alex Howansky Avatar answered Oct 07 '22 01:10

Alex Howansky