tags:

views:

172

answers:

7

EDIT: To answer some of the comments - the file extension is .php, the perspective is PHP, and it is in a PHP project. I can't use different tools because this is a school project

I have Eclipse with Web Tools (so I can do web projects with JSP). I also have to use Eclipse for my PHP development (I am using it with XAMPP, if that matters). (Two different school projects.)

I have installed the plug in for PHP (in addition to XAMPP, which includes PHP itself) and it appears to work, in that I have a PHP perspective and can create a new PHP project. However, even when doing something as simple as the below, it doesn't work. Eclipse does not recognize the php tags at all.

Does anyone have any ideas what I'm missing?

<html>
<head>
<title>My First PHP Page</title>
</head>
<body>
<?php
echo "Hello World!";
?>
</body>
</html>
A: 

Maybe change your current Eclipse perspective into PHP?

lemon
A: 

Is the extension of the file .php?

Cesar
A: 

I believe Eclipse chooses the appropriate editor (and highlighter) based on the extension of the file you're editing. Try using .php or .phtml if you can.

Justin Johnson
+4  A: 
Pascal MARTIN
I'll be sure to try this and let you know. It sounds like the kind of step I might be missing. Thanks!
sql_mommy
I checked this, and under PHP content type .php, .php3, 4, and 5 are all already there. Any other ideas?
sql_mommy
ok - I added a response that is how I actually fixed the project, but your is still excellent so I voted for you. Thanks!
sql_mommy
Thanks :-) And thanks for posting the solution that worked for you !
Pascal MARTIN
A: 

I think you'd better use www.aptana.org for editing web pages. Aptana is really cool in this.

FractalizeR
She is asking for a solution to solve the Eclipse issue, probably a matter of configuration as Pascal pointed out, not looking for tools recommendations.
JuanZe
A: 

If you want to keep your existing Eclipse build you can also add Aptana as a Eclipse plugin or Aptana as a standalone as @FractalizeR has suggested.

Phill Pafford
+1  A: 

ok - on a whim I decided to look for menu options that might help. And I chose Project > Clean, which rebuilds from scratch. It suddenly works!

I don't know what happened, but apparently, it was an old error that I had fixed with the right plug-in info and I just needed the project to rebuild.

Thanks for the ideas, though!

sql_mommy