php - SVG Image not using parameter -


I am trying to create a SVG that takes parameters, but for some reason it does not implement them ...

I have the following SVG file:

  & lt ;? Xml version = "1.0" encoding = "UTF-8" standalone = "no"? & Gt; & Lt; Svg width = "1" height = "1" xmlns: svg = "http://www.w3.org/2000/svg" xmlns = "http://www.w3.org/2000/svg" version = " 1.1 "& gt; & Lt; Defs & gt; & Lt; ref id = "paramFill" param = "color" default = "# 000000" /> & Lt; ref id = "paramOpacity" param = "opacity" default = "1" /> & Lt; / Defs & gt; & Lt; Polygon points = "0,0 1,0 1,1 0,1" style = "fill: url (#paramFill); Fill-opacity: url (#paramOpacity); Fill-rule: evening; / & gt; & Lt ; / Svg & gt;   

The PHP caller looks like a SVG file, but when the image is displayed on the page, I get an all black image. This is my parameter Why not use it? Only two colors should be made: # 9999FF or #FFFFFF Why is it using the default color? < pre> & lt ;? php // a loop Rate: $ color = ($ chi == $ i & amp; $ chj == $ j)? "# 99 99 FF": "# Ffffff" echo "& lt; td style = 'background-image: url (/Websites/test.org/images/bg.svg?color=$color);' & Gt; & Lt; / Td> "

You can enter a # # (your color values), nothing is being seen as color value - this page is being viewed as anchor reference. < pre> . url (/ .....? color = # 99 99ff); ... ^ --- Anchor

Browser will be brought < pre> ... url (/ .... .... color =)

If this was an HTML page, then it would be below & lt; a name = "9999ff" & gt; , which is not on a svg Likul possible.

Try urlencode () - at least:

  ...? Color =% 239999ff ^^^ --- URL-encoded #    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -