如何在php中保存svg文件

时间:2015-07-24 08:25:18

标签: javascript php svg

如何在php中执行此操作。我需要使用php库

<svg
   xmlns="http://www.w3.org/2000/svg" width="360" height="180">
   <circle class="little" cx="180" cy="45" r="12"/>
   <circle class="little" cx="60" cy="90" r="12"/>
   <circle class="little" cx="300" cy="135" r="12"/>
</svg>

您好我有一个xml数据,我只想将其保存在我的文件夹中:images / circle.svg

这里有没有人可以帮助我。 非常感谢你

1 个答案:

答案 0 :(得分:5)

所以你把数据存储为变量,对吧?容易腻。

file_put_contents('images/circle.svg', $SVGData);