Does anyone have any idea why I can display a true SVG file successfully 
in IE 6 with Adobe SVG viewer 3.0, but not when the identical content is 
generated by PHP. Example:

SVGRECT.SVG displays properly (Apache server includes directive "AddType 
image/svg+xml svg"):

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" 
<rect x="10" y="0" width="460" height="50" />

However, SVGRECT.PHP, which results in the same page text, brings up a 
dialog box "Would you like to open the file or save it to your 
computer?" Choosing "Open" causes nothing to happen. Choosing "Save" 
results in another dialog box "Internet Explorer  was unable to open 
this internet site:

header("Content-type: image/svg+xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>";
echo "\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\" 
echo "\n<svg>";
echo "\n<rect x=\"10\" y=\"0\" width=\"460\" height=\"50\" />";
echo "\n</svg>";

Displaying SVGRECT.PHP from another PHP page using the <embed> tag works 

Here's another curious occurrence that may be related: displaying any   php 
page as a local file brings up the Windows "Open with" dialog, whereas 
referencing the same page as a URL works.

Any insighta you can provide would be appreciated. Thanks.

John Gunther

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to