2013-02-24 4 views
2

내 웹 사이트에 벡터 이미지를 표시하는 SVG 객체가 있습니다.이 오프라인을 테스트하는 동안 모든 것이 잘 작동하지만, 내 웹 사이트에 업로드하면 객체에 SVG 코드가 표시됩니다. 여기에서 볼 수 : link to site with svgSVG SVG 대신 SVG 코드를 표시하는 객체?

개체 코드 :

<object type="image/svg+xml" data="ppvisual.svg" width="702px" height="259.37px"> 
<param name="colour" value="<?php echo $colour; ?>" /> 
<param name="textcolour" value="<?php echo $textcolour; ?>" /> 
<param name="lanyardtext" value="<?php echo $lanyardtext; ?>" /> 
</object> 

DOCTYPE이 (그것과 아무 상관이있다 넣다?)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 

SVG 코드 : 나는 '

<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" 
width="702px" height="259.37px" viewBox="0 0 702 259.37" enable-background="new 0 0 702 259.37" xml:space="preserve"> 
<g> 
<g> 
    <polygon fill="none" points="0,80.811 0.053,113.105 48.17,112.998 48.117,80.705   "/> 

     <image overflow="visible" width="109" height="188" xlink:href="fitment1.png" transform="matrix(4.854395e-04 0.2963 -0.2559 5.628683e-04 48.1172 80.7046)"> 
    </image> 
</g> 
</g> 
<g> 
<path fill-rule="evenodd" clip-rule="evenodd" fill="param(colour) white" d="M43.807,108.613c-0.241,0-0.476-0.086-0.659-0.248 
    c-0.217-0.189-0.341-0.463-0.341-0.752v-22.26c0-0.502,0.372-0.926,0.87-0.991l633.935-83.34c0.043-0.005,0.086-0.008,0.129-0.008 
    c0.264,0,0.52,0.104,0.707,0.293l22.26,22.26c0.188,0.188,0.293,0.442,0.293,0.707v61.08c0,0.553-0.447,1-1,1h-22.26 
    c-0.553,0-1-0.447-1-1v-59.94L43.938,108.605C43.894,108.611,43.851,108.613,43.807,108.613z"/> 
<path fill="#636466" d="M677.74,2.013L700,24.273v61.08h-22.26v-61.08l-633.933,83.34v-22.26L677.74,2.013 M677.74,0.013 
    c-0.086,0-0.174,0.005-0.26,0.017L43.546,83.371c-0.995,0.13-1.739,0.979-1.739,1.982v22.26c0,0.576,0.248,1.125,0.681,1.504 
    c0.367,0.322,0.836,0.496,1.319,0.496c0.086,0,0.174-0.006,0.261-0.016L675.74,26.553v58.8c0,1.104,0.896,2,2,2H700 
    c1.105,0,2-0.896,2-2v-61.08c0-0.53-0.211-1.039-0.586-1.414l-22.26-22.26C678.777,0.222,678.268,0.013,677.74,0.013L677.74,0.013z 
    "/> 
</g> 
<g> 
<path fill-rule="evenodd" clip-rule="evenodd" fill="param(colour) white" d="M43.807,108.613c-0.552,0-1-0.447-1-1v-22.26c0-0.552,0.448-1,1-1 
    H700c0.404,0,0.77,0.244,0.924,0.617c0.155,0.374,0.069,0.804-0.217,1.09l-22.26,22.26c-0.188,0.188-0.441,0.293-0.707,0.293 
    H43.807z"/> 
<path fill="#636466" d="M700,85.353l-22.26,22.26H43.807v-22.26H677.74H700 M700,83.353h-22.26H43.807c-1.104,0-2,0.896-2,2v22.26 
    c0,1.104,0.896,2,2,2H677.74c0.53,0,1.039-0.211,1.414-0.586l22.26-22.26c0.572-0.572,0.743-1.432,0.434-2.18 
    C701.538,83.84,700.809,83.353,700,83.353L700,83.353z"/> 
</g> 
<rect x="0" y="186.505" fill-rule="evenodd" clip-rule="evenodd" fill="param(colour) white" width="702" height="70.865"/> 
<path fill="#636466" d="M702,257.37H0v2h702V257.37z M702,186.505v-2l0,0H0v2H702"/> 
<g> 
<defs> 
    <polygon id="SVGID_1_" points="677.74,107.613 43.807,107.613 43.807,85.353 677.74,85.353 700,85.353   "/> 
</defs> 
<clipPath id="SVGID_2_"> 
    <use xlink:href="#SVGID_1_" overflow="visible"/> 
</clipPath> 
<g clip-path="url(#SVGID_2_)"> 
    <text transform="matrix(1 0 0 1 372 102.272)" fill="param(textcolour) white" font-family="'Verdana-Bold'" font-size="16" text-anchor="middle" content-value="param(lanyardtext)">Enter Your Text   Enter Your Text   Enter Your Text   Enter Your Text</text> 
</g> 
</g> 
<g> 
<defs> 
    <rect id="SVGID_3_" x="0" y="186.505" width="702" height="70.865"/> 
</defs> 
<clipPath id="SVGID_4_"> 
    <use xlink:href="#SVGID_3_" overflow="visible"/> 
</clipPath> 
<g clip-path="url(#SVGID_4_)"> 
    <text transform="matrix(1 0 0 1 350 240.0977)" fill="param(textcolour) white" font-family="'Verdana-Bold'" font-size="50.9319" text-anchor="middle" content-value="param(lanyardtext) white">Enter Your Text   Enter Your Text   Enter Your Text   Enter Your Text</text> 
</g> 
</g> 

<script type="text/ecmascript" xlink:href="param.js" /> 
</svg> 

이게 서버 설정에 관한 것이 아닐까? 아무도 내가 어떻게 고칠 생각이있어?

미리 감사드립니다.

답변

2

MIME 유형이 text/plain 인 SVG 데이터를 보내고 있습니다. mime 유형의 image/svg + xml을 보내려면 웹 서버를 다시 구성해야합니다. 어떻게하는지는 사용중인 웹 서버에 따라 다릅니다.

관련 문제