2

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!

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.