user3108268 user3108268 -4 years ago 36
PHP Question

Aptana Studio 3 doesn't recognize PHP inside .html

When implementing code like i.e.

<!DOCTYPE html>

echo "My first PHP script!";


Next to
it gives red X icon with error that "<" missing '>' for end of tag. I did find some older threads about this here at stackoverflow, but there wasn't really any solution or response at all. I tried the solution of adding PHP Source Editor for .html and setting it as default, but looks like it doesn't work.

It's not a deal breaker, it's just I don't like red icons and false errors throughout the code.

Answer Source

The title of your question suggests that you are saving the files as .html

If this is the case then there will be an error as Aptana will not be looking to validate <?php ?> tags. If I'm right then you will need to save the files as filename.php and not filename.html.

If this is not the case then you might want to change the title slightly.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download