|
that's
a very valid one that i didn't mention simon :)
i had
that exact same problem on my server, where my hosted site is configured to
parse all files as XML and PHP (apparently) and so I had conflicts - ended up
having to use something like this;
<?php echo "<"; ?>?xml version="1.0"
encoding="iso-8859-1"?<?php echo ">\n"; ?>
Beau
Another thing to
consider is XML. Some people (myself included) create XML files on a regular
basis. The PHP short tag <? can easily be confused by XML parsers, because
it is the same as the beginning of a Processing Instruction. For
example: <?xml version="1.0" encoding="iso-8859-1"
?>
The
problem doesn't usually arise, because the server strips the page of PHP as it
is being served; however, it is better to be safe than sorry,
eh?
-------------------------------------- Simon
Jessey business: http://keystonewebsites.com/ personal: http://jessey.net/blog/ e:
[EMAIL PROTECTED]
<?php is more reliable - you can configure a server to ignore
"<?" as an opening PHP tag (short_tags i think the directive is from
memory).
for compatibilities sake, you should always use the <?php tag in
your coding, but if short tags are enabled, then technically the 2 are the
same (both just define a block of PHP code)
Wondering, what is the
difference between using:
<?
/* php code
*/ ?>
as opposed
to:
<?PHP
/* php code
*/
?>
|