php, and svg problem
| From: | Gil Perez | Date: | Thu, 09 Jan 2003 02:56:29 +0000 |
| Subject: | php, and svg problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-131014@lists.php.net to get a copy of this message | ||
Hello,
I have a big problem with reading a value in SVG through a PHP file.
The value i want to draw is "$large".
There are 3 little files restricted to the minimum.
I would be so happy if someone could find the mistake here.
Thanks a lot.
Gil
---------
data.php
---------
<?php
$large = 750;
$haut = 450;
?>
----------
index.php
----------
<HTML>
<BODY>
<?php
include("data.php"); // ok
echo("$large"); // ok
echo("<embed width=$large height=$haut src='svg.php'>");
?>
</BODY>
</HTML>
--------
svg.php
--------
<?php
include("data.php"); // OK ??????
function writeSVG()
{
global $large, $haut;
echo "<?xml version='1.0' encoding='iso-8859-1'?>\n";
echo "<svg id='root' xml:space='preserve' width='$large'
height='$haut'>\n";
echo "<text x='40' y='40'>$large</text>\n";
echo "</svg>";
}
header("Content-Type: image/svg+xml");
writeSVG();
?>