Can PHP and HTML codes in a single file help?

I am trying to use Aptana for some web programming. For the most part, I am impressed! One thing that drives me crazy is that Aptana will not execute the help of the PHP code in the .html file ... and, conversely, it will not support the HTML code in the .php file ?!

Am I missing something? Pushing the "best practices" aside for a moment ... PHP and HTML can live harmoniously in one file. So, how do I edit both languages ​​in the same file ?!

PS I use CODA, which has an equivalent called syntax mode. You can choose PHP-HTML ... which is exactly what I need in Aptana!

+6
html php aptana
source share
3 answers

I also use Aptana, or rather: Eclipse 3.4.2 + Aptana 1.5 + Aptana PHP Plugin. I have HTML code in my PHP files. Make sure in Window->Preferences->General->Editors->File Associations you have the Aptana PHP editor as the default editor for .php files.

But it’s true that you do not have PHP code support in the default HTML files. Thus, the easiest way to get this is to also use the Aptana PHP editor for .html files.

+2
source share

Aptana Studio 3 does all the HTML / JS / CSS / PHP code helps in php files. By default, html files will not include support for PHP code unless you link the html files to a PHP editor.

Regards, Max

0
source share

I recently used Sublime Text 2 . It will do code highlighting / syntax highlighting for PHP and HTML in the same file.

This is a free, endless trial for Windows / Mac / Linux. However, after a few weeks I liked to pay for the license.

0
source share

All Articles