Re: SVG and PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2010-01-05 at 14:57 -0500, Alice Wei 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: 
> 
> <?php
>  
> #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
>  		 	   		  
> _________________________________________________________________
> Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
> http://clk.atdmt.com/GBL/go/177141664/direct/01/


If you go the fopen route, you need to get the contents of the file and
print them out to the browser, with the correct SVG headers. All you're
doing here creating a read-only resource to the file.

Thanks,
Ash
http://www.ashleysheridan.co.uk



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux