SVG and PHP

SVG and PHP

am 07.01.2010 00:04:13 von Bob Strasser

Hi,=20

Just went online and saw an SVG generated from Python, and wanted to
do the similar thing by loading the SVG into an PHP script. Here is the
script that I have:=20

=20
#Load the Map
$ourFileName=3D "USA_Counties_with_FIPS_and_names.svg";
$fh =3D fopen($ourFileName, "r") or die("Can't open file");
fclose($fh);=20

?>

The problem is that my screen appears as blank even though I could open
up USA_Counties_with_FIPS_and_names.svg and see the entire US Map. Does
anyone know what I might have done wrong here?=20

Thanks in advance.=20

Alice
=20
____________________________________________________________ _____
Hotmail: Trusted email with Microsoft=92s powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141664/direct/01/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: SVG and PHP

am 11.01.2010 17:59:06 von haliphax

--00151750de3c85eabc047ce674aa
Content-Type: text/plain; charset=UTF-8

On Wed, Jan 6, 2010 at 5:04 PM, Bob Strasser wrote:

>
> Hi,
>
> Just went online and saw an SVG generated from Python, and wanted to
> do the similar thing by loading the SVG into an PHP script. Here is the
> script that I have:
>
> >
> #Load the Map
> $ourFileName= "USA_Counties_with_FIPS_and_names.svg";
> $fh = fopen($ourFileName, "r") or die("Can't open file");
> fclose($fh);
>
> ?>
>
> The problem is that my screen appears as blank even though I could open
> up USA_Counties_with_FIPS_and_names.svg and see the entire US Map. Does
> anyone know what I might have done wrong here?
>
> Thanks in advance.
>
> Alice
>
>
Bob/Alice/Whatever,

You don't do anything with the SVG file except open it and close it. Opening
and closing a door doesn't walk you through the doorway. Maybe you should
"echo" the contents of said file after sending a Content-Type header through
to the browser?


// Todd

--00151750de3c85eabc047ce674aa--