svg apache php configeration [Archive] - XML Elves

svg apache php configeration

ab
05-31-2005, 05:42 AM
i am trying to implement the following simple code using the server apache and php script
but the result is an xml nodeset not the svg graph
how can i configer the system to be abe to comunicate with each other

thanks

<?php
header&#40;"Content-type&#58; image/svg+xml"&#41;;
echo '<?xml version="1.0" encoding="iso-8859-1" ?>';
?>
<svg viewBox="0 0 500 500" >
<rect x="0" y="0" width="50" height="50" >
<text x="12" y="20" style="font-size&#58;10px;"> My Text</text>
</rect>
</svg>

Anonymous
05-31-2005, 05:51 AM
Try this

<?php
header("Content-type: image/svg+xml");
print('<?xml version="1.0" encoding="iso-8859-1" ?>');
print('<svg viewBox="0 0 500 500" >');
print('<rect x="0" y="0" width="50" height="50" >');
print('<text x="12" y="20" style="font-size:10px;"> My Text</text>' );
print('</rect>');
print('</svg>');
?>

This run for me ...

Michel

 
Web mp2kmag.com
mapforums.com

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum