How to View index.php in Browser
Hi, I am new to PHP Storm and am trying to get started with it.I create a new blank project, then add a php file called index.php.I then add one line of code echo phpinfo();.How do I prevew this in a browser? The help file says to press alt F2, but this gives me the bookmark window. I don't see the hover window that is supposed to be available. I have set the browser in Settings/IDE/Browser.Is there something else I am supposed to do?Greg
请先登录再写评论。
Hi there,
Yes, it is Alt+F2 for preview functionality.
Seems you are using different keymap (Settings | Keymap).
Please check (and use) whataver shortcut you have assigned to "View | Prevew file in..." (focus must be in Editor window (and not side tool windows) when menu is invoked).
What version do you use?
As I understand it is 6.0.3. If so :
In any case: if you properly define Deployment entry ("In Place" type should be OK) and mark it as Default; then you will be able to use "View | Open in Browser..." on any file (default browser will be used)
P.S.
Try upcoming v7 (EAP build available now) -- it has been reworked quite a bit in this area so it should work for php files as well