Sublime Forum

.php page preview problem

#1

Hi everyone, i’ve just adopted Sublime Text 2 as my code editor.
I love the way it works and I now use LESS for CSS which makes life a lot easier.
I used to use Dreamweaver with my website folders stored in a htdocs folder within MAMP.
I have sidebarextension installed and Nijikokun/Prevu so I can get previews via F12 for .html pages.
But it only previews the code in the browser when I try and preview .php pages. I’ve used php includes for menus.
How can I get it to display the page, is sublime text only able to display .html?
This is what I have in a project file which is the correct path:
{“folders”:
{
“path”: “/Applications/MAMP/htdocs/conceptdesigns-php”
}],
}
Regards
Tony

0 Likes

#2

The F12 shortcut already comes with Sublime, you don’t need any plugin to use it. To preview at localhost, you can use ⌥ + F12.

There are also lots of plugins that do it:
github.com/adampresley/sublime- … cal-Server

0 Likes

#3

hi, the page loads in the browser for preview but with a .php extension it displays the source code and not the webpage, lt displays .html fine, any ideas?

0 Likes