Eclipse won't show PHP files - php

I'm not sure if I did anything to cause this, but when I opened up Eclipse, it would only let me view and edit HTML, CSS, and JavaScript files. If I try to open a PHP file, a blank window opens where you would normally view the file. The window has no content or title, just the "X" to close it. Anyone have any ideas what would cause this?
In case it matters, I'm using Version: Luna Release (4.4.0)
Build id: 20140612-0600

Related

See the code included in a php file on vscode

Is there a way to see the included code by "included" or "require_once" in the same file without open the included file? Sometimes I would like to have all the final code in the same page..
I usually use vscode, but if there is a way with another tool i can give it a try.
Thanks
Adobe Dreamweaver has this capability: you can simply press Ctrl+D while cursor is on "include" or "require" and included file will open in the new tab. Very convinient. I have also searched for anything similar for VS Code, but sadly couldn't find anything. Adobe Dreamweaver is not free like VS Code though.

Notepad++ php load error page

I have made a custom theme with wordpress locally with wamp.I use notepad++ for writing my code.Some days before when I wanted to load my page from notepad I had to go to run->launch in Firefox and had no problem showing the page where in the address bar the URL was:localhost/wordpress.
Now when I try to load my php files from notepad (run ->launch in Firefox) it shows a corrupt html page not all of it ,with some rules of php and without CSS and no images.In the address bar when running my project from notepad the URL is file:///C:/wamp/www/wordpress/wp-content/themes/revenant/page-about-us.php which is incorect ofcourse.Also it does not understand the php code.For example the title for about us page is
<?php echo get_the_title('about-us'); ?>
But when I write manually in the address bar the URL of my project like localhost/wordpress everythng shows as they shown before with no problem.I have not changed any settings in notepad.Why this problem came up with no reason?Why it doesnot load php and css? Thank you!
Notepad++ doesn't know that you have a webserver running or what the document root is, so it cannot take you to the file's URL. When it opens the file in the browser, it is loading the file directly off the hard drive (hence the file://). It is not being served by the webserver that knows how to parse PHP, it is being read directly by the browser, which does not.

PhpStorm: Show "Run" output as rendered HTML (in an internal browser)?

Is it possible to view the output of a PHP script in the Run Tool Window as rendered HTML?
I have an application that generates HTML output and currently I need to copy it from the console, save it in an HTML file and open that file in a browser to view the rendered output.
Eclipse PDT has a view called "Web Browser", for instance.
Unfortunately no -- PhpStorm (and any other IDE built on IDEA platform AFAIK) does not have such functionality.
You may submit Feature Request ticket to their Issue Tracker .. but I doubt that it will be implemented any time soon (very limited usage case, as far as I see it right now).
I may suggest to save such output into .html file directly (if you can edit such script -- at least during your debug/test sessions) and open it in browser (then simple "Refresh" in browser will do the job).
If you are executing the PHP file in the console and then manually copying the html code and saving it to a file and finally running it, running this command might help :
php file.php | cat > file.html | google_chrome file.html
Or maybe you can just do :
php file.php | cat > file.html
and refresh the page in the browser.
In this case you won't have to manually copy the code each time.

Webstorm doesn't debug .php files in Chrome

When I click "debugging"
in Firefox I get the result page in html, that I can inspect:
But in Chrome I just get PHP source code:
What is the problem?
Has anyone come across?
You're accessing the file directly on disk. Try accessing it through your webserver (in other words, serve the page as HTML).

open text files from browser in external application

I am developing in zend on my local machine. When i get an error i am shown the link to the php file that gave me the error. What i would like to do is be able to click on that link and have the file open in sublime text 2 so it would same me some time. I have installed the chrome extension LocalLinks to get the browser to open local files but the php file only opens in the browser. Any ideas on this?
Thanks.
LocalLinks:
https://chrome.google.com/webstore/detail/jllpkdkcdjndhggodimiphkghogcpida
Why you just simply use CTRL+P (CMD+P in Mac) to open the file you need in sublime by just typing a little part of the name?

Categories