我有此片段的代码,其抓住SVG图像的源,并将其添加到HTML:Add功能PHP的file_get_contents路径
<?php echo file_get_contents("assets/images/lightening.svg"); ?>
我要添加的函数的根(); (我已经工作),它告诉它在哪里站点的根(它在多个位置提升网站)的开始路径。
我要的是这个版本的作品:
<?php echo file_get_contents("'root();'.assets/images/lightening.svg"); ?>
任何帮助将大大赞赏。 谢谢。
的file_get_contents(根()'资产/图像... – kainaw