note 35661 rejected from function.print by didou
| From: | didou@php.net | Date: | Wed, 10 Sep 2003 10:46:06 +0000 |
| Subject: | note 35661 rejected from function.print by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-55924@lists.php.net to get a copy of this message | ||
Note Submitter: svd_vdvk@hotmail.com
----
There must be a difference between a PHP print output and a simple flat HTML or XML source file
For example, if the following XML stuff is placed in a .XML file (with the correct stylesheet it the
right place), it displays correctly with IE or Netscape:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="stylesheets/form_style_sheet.xsl"?>
<form>
<one_link>
<href>file.php</href>
<caption>some caption</caption>
<one_link>
</form>
Now if I just edit the file to have:
<?php
print "<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl"
href="stylesheets/form_style_sheet.xsl"?>
<form>
<one_link>
<href>file.php</href>
<caption>some caption</caption>
<one_link>
</form>
";
?>
Some browser refuse it (for example, Netscape just show me the contain of the tags, ignoring the
stylesheet)
The very weird thing is that when viewing the source in the browser in both cases and with IE 6 or
Netscape 7, I got excatly the same output. Just that Netscape seems to behave differently when
receiving the same data from a flat file or from PHP.
Anyone knows how to control the "format" of what print (or echo, this one does not work
either) outputs?