Reply to The Dark Side of short tags (Was: nOOb question...)

Your name:

Reply:


Posted by Kimmo Laine on 11/27/79 11:25

"ZeldorBlat" <zeldorblat@gmail.com> kirjoitti
viestissδ:1125496435.748162.26960@g14g2000cwa.googlegroups.com...
> Yeah, that's how I would normally write it...with the short tags. But
> I figure if you're just learning, you might as well get into the habbit
> of the full open tags since people these days seem to think that
> they're bad :)

They are bad, at least if you're writing (or trying to write) xhtml
compatible code. There you need the xml declaration row <?xml version="1.0"
encoding="UTF-8"?>. If short tags are on, and the xml declaration is in a
php file, it's concidered as php. And since 'xml version="1.0"
encoding="UTF-8"' makes no sense in php, it raises an error. I've done a few
times so that I echo the xml tag , ie <?= '<?xml version="1.0"
encoding="UTF-8"?>' ?>, but that again is bad practise. It would be better
to leave short tags out and write proper code.

--
SETI @ Home - Donate your cpu's idle time to science.
Further reading at <http://setiweb.ssl.berkeley.edu/>
Kimmo Laine <eternal.erectionN0@5P4Mgmail.com>

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация