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
-----Original Message-----
From: Simon Jessey [mailto:[EMAIL PROTECTED]
Sent: Monday, 8 December 2003 8:25 PM
To: [EMAIL PROTECTED]
Subject: RE: [WSG] PHP Question...

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]

 
-----Original Message-----
From: Beau Lebens [mailto:[EMAIL PROTECTED]
Subject: RE: [WSG] PHP Question...

<?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)
-----Original Message-----
From: Chris Stratford [mailto:[EMAIL PROTECTED]
Subject: [WSG] PHP Question...

 

 

Wondering, what is the difference between using:

 

<?

/* php code */
?>

 

as opposed to:

 

<?PHP

/* php code */

?>

 

Reply via email to