Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress WordPress Theme Development Starting a WordPress Theme Setting Up A WordPress Theme Folder

melissa brown
melissa brown
4,670 Points

opening php files in browser through sublime

in sublime i have no problem right clicking on the index.html file to open in browser. but when i right click on the index.php there is no button to open it in the browser. i am just wondering why this is?

10 Answers

It should be under open with.

melissa brown
melissa brown
4,670 Points

i dont have the option open with when i right click i only have open containing folder, copy file path or reveal in side bar.

What version of sublime are you using?

melissa brown
melissa brown
4,670 Points

sublime 3 or 3065 to be exact

On what os?

in open with is there an option that says edit applications?

melissa brown
melissa brown
4,670 Points

there is no 'open with' when i right click and then if i go into file at the top bar there is only , open file, open folder, open recent. and i cant see anything called 'edit applications' in the edit toolbar either.

ahh I think I know what the issue is.Do you have a list of files on the left side of sublime?

http://imgur.com/5BJzEIg

Sorry I have been using sublime on my mac recently and most of this stuff works out of the box. I am working through a solution on windows give me a few minutes.

OK if you don't have the package installer installed(if you press control + alt + p, type in install, and nothing is listed) then you will need to install that first.

https://packagecontrol.io/installation

you should be able to do the simple install. You might have to restart sublime after the install is done.

next you will need to pres control + alt + p and type install, click on Package Control: Install Package

next type in View in Browser and choose that option. It should show up before you are finished typing it out. That will install the plugin. you might have to restart sublime. Once this is done you should be able to right click on the page and click view in browser. There might be some additional setup that needs to be done, but this is outlined on the github page below. I mention this because you are asking about a php page and that will probably need a little setup but take a look at the configure to view on local server section. This link will take you directly there.

https://github.com/adampresley/sublime-view-in-browser#configure-to-view-on-local-server

Please let me know once you get this working or if you have any other issues.

melissa brown
melissa brown
4,670 Points

thank you so so much for all your help. just having one slight problem. i am currently in china so i have to use a proxy. i have to do the manual install. of the package control. i have gotten this far
Click the Preferences > Browse Packages… menu Browse up a folder and then into the Installed Packages/ folder

Download Package Control.sublime-package and copy it into the Installed Packages/ directory

( i couldnt seem to open the file) tried opening it in note pad and pasted it into the view> console> received an error msg.

you don't need to open the file, just make sure it is in the installed packages folder and restart sublime. After you restart you should be able to press control + alt + p and type in install and it should find the package installer. I installed it the same way.

melissa brown
melissa brown
4,670 Points

im really sorry but im a little lost. if i go Click the Preferences > Browse Packages… menu Browse up a folder and then into the Installed Packages/ folder i already see a file called Package Control.sublime-package

when i close sublime and reopen it and press ctrl+Alt+P a little box comes up. but if i type install nothing comes up.

or am i missing a special way to restart sublime?

Try ending sublime from the windows task manager. What version of windows are you running?

melissa brown
melissa brown
4,670 Points

im running windows 7 64bit. maybe i should reinstall sublime and see if that works.

I would restart your computer before you consider reinstall Sublime. Reinstall seems a bit drastic.

melissa brown
melissa brown
4,670 Points

its working now. i just want you to know that i really appreciate that you took the time out of you day to help me solve a problem. thank you so so so much!

No problem if you have any other issues you can reach me at jphillips05@gmail.com