|
Posted by Kimmo Laine on 09/29/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>
Navigation:
[Reply to this message]
|