Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Why inline php short tag in htpl is bad syntax?
Why inline php short tag in htpl is bad syntax? [message #80739] Thu, 25 September 2008 22:14 Go to next message
Peter Arato is currently offline Peter AratoFriend
Messages: 2
Registered: July 2009
Junior Member
Hi!

I'm using Eclipse PDT. I use *.htpl files for teplates in a php project,
and it's annoying, that eclipse finds bad systax where i use php short
tags in html, e.g.:
<a href="<?= $link ?>">Link</a>

Error message: [Invalid characer used in text string (<?=...]

Where can I tell eclipse, that it's not a bad syntax?

Thanks a lot, Peter.
Re: Why inline php short tag in htpl is bad syntax? [message #80791 is a reply to message #80739] Fri, 26 September 2008 01:06 Go to previous messageGo to next message
David Muir is currently offline David MuirFriend
Messages: 63
Registered: July 2009
Member
Peter,

The problem is that you're using the HTML editor instead of the PHP
editor. Go to Window->Preferences. Then go to General->Content Types. Open
up "Text" and go to "PHP Content Type". Add .htpl, and you should be set.

Cheers,
David

Peter Arato wrote:

> Hi!

> I'm using Eclipse PDT. I use *.htpl files for teplates in a php project,
> and it's annoying, that eclipse finds bad systax where i use php short
> tags in html, e.g.:
> <a href="<?= $link ?>">Link</a>

> Error message: [Invalid characer used in text string (<?=...]

> Where can I tell eclipse, that it's not a bad syntax?

> Thanks a lot, Peter.
Re: Why inline php short tag in htpl is bad syntax? [message #80819 is a reply to message #80791] Fri, 26 September 2008 08:04 Go to previous messageGo to next message
Peter Arato is currently offline Peter AratoFriend
Messages: 2
Registered: July 2009
Junior Member
Hi David!

Thanks a lot, it works.

Peter
Re: Why inline php short tag in htpl is bad syntax? [message #80952 is a reply to message #80819] Tue, 30 September 2008 11:26 Go to previous message
Michael Fesser is currently offline Michael FesserFriend
Messages: 16
Registered: July 2009
Junior Member
..oO(Peter Arato)

>Thanks a lot, it works.

You should also consider to avoid short open tags, since they're
unreliable and will be turned off by default in the coming PHP 6.

Micha
Previous Topic:Automatically returning to PHP perspective after debug session
Next Topic:Troubles loading source into the editor
Goto Forum:
  


Current Time: Thu Mar 23 17:59:43 GMT 2023

Powered by FUDForum. Page generated in 0.02223 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top