I want to create an SVG file with PHP, and then add it to an HTML file. Here is what I have done so far (the following)
svg.php: index.html When I look at Geophysnex answered, I thought I would call it a if you PHP PHP code (instead of an XML declaration) Instead) as the opening tag for with Its only intention is the result and not the reason for syntax errors.
& Lt; Circle cx = "170" cy = "25" r = "20" style = "stroke-width: 4" /> & Lt; Line x1 = "265" y1 = "10" x2 = "200" y2 = "70" style = "stroke-width: 4" /> & Lt; Text x = "80" y = "90" style = "font: size: 8" & gt; Original size & lt; / Text & gt; & Lt; / G> & Lt; / Svg & gt;
& lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Style type = "text / css" & gt; HTML, body, #MOVVG {height: 100%; Width: 100%; Padding: 0; Margin: 0; } & Lt; / Style & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Object data = "svg.php" type = "image / svg + xml" id = "MOSVG" /> & Lt; / Body & gt; & Lt; / Html & gt;
index.html , I see an empty page. There is no warning / error on the console Apache error log (I am using XAMPP)
[Mon Jul 09 14:36:15 2012] [Error] [Client 127.0.0.1] Script 'C: / xampp / Htdocs / svgtest / public / svg.php 'Not found or unable for state, referrer: http: // localhost / svgtest / public / they are in the same directory.
& lt ;? Xml? & Gt;
& lt ;? Php echo '& lt ;? XML version = "1.0" encoding = "ISO-8859-1" & gt; ';; & Gt;
Comments
Post a Comment