Per Jessen wrote:
brian wrote:
Per Jessen wrote:
magoo wrote:
In their oppinion stuff like the short PHP init "<?" or inline
echo "<?= $var ?>" is forbidden. Do you people code that
strict?
Yep. If you're using XHTML you have no other option.
If you're parsing XHTML that is choking on any instances of "<%"
then you've got a problem with your script.
I'm not parsing it, apache does that.
Semantics
An XHTML document will start with:
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1//EN" "xhtml11.dtd"> <html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
Uh-huh ... but then that's not a PHP script, is it?
To be more specific, something on the server that is meant to parse
XHTML should not be encountering PHP syntax. If it does, then it is
either wrongly attempting to parse a PHP script instead of XHTML, or
your PHP script has syntax errors.
IOW, if you've got some PHP scripts that *output* XHTML, PHP shouldn't
be leaving behind its own opening and closing tags. If it is (as i said
earlier) you've got a problem with your script.
Or, perhaps what you mean is that the <?xml tag might be interpreted by
PHP (as opposed to an XHTML parser misinterpreting PHP tags)? If that's
the case, simply don't leave it bare in the script. Have PHP print it.
brian
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php