Issue
I am using the latest NetBeans in a Mac OS X environment, I am writing HTML files with embedded PHP within them, my web server has a handler for PHP within HTML and Vice/Versa.
It doesn't seem that NetBeans by default acknowledges the syntax of PHP within HTML files. I have included a photo of PHP within PHP/HTML files respectively to show the difference.
This is the problematic photo, showing the PHP elements not being shown like normal PHP code.
The code within a .PHP file, being shown correctly as well as HTML being shown correctly.
My question being, is it possible within netbeans to add PHP rendering to the HTML mime type? I have used several research methods and dug through the foo of netbeans to attempt to accomplish this.
Thank you for any help you could provide!
Solution
It is not a usual circumstance where web servers by default execute PHP within the HTML mime type.
To force NetBeans to check PHP within HTML files, follow these instructions.
Go to Tools > Options > Miscellaneous > Files. From drop down menu File Extension select html. From drop down menu Associated File Type (MIME) select text-x-php5.
Answered By - Christopher Allen
Answer Checked By - Clifford M. (JavaFixing Volunteer)