开发者

How to insert PHP script into HTML the best way?

开发者 https://www.devze.com 2023-01-02 06:06 出处:网络
I have to insert full path to every single image/css file of my website, because of url_rewriting and I\'m looking for the most officiant way to do it.

I have to insert full path to every single image/css file of my website, because of url_rewriting and I'm looking for the most officiant way to do it.

Of course I could do:

<img src='<?php echo $full_path; ?>/images/theImg.jpg' alt='alternative text' />

But somewhere I saw people doing it like this, or something:

<img src='{full_path}/images/theImg.jpg' />

Now do you know how the second example is possible, or is it just part of some framework and can't be used 开发者_开发技巧in normal document?

Thanks for answers,

Mike


It is just part of some framework and can't be used in normal document.


And if it's not a full framework, perhaps it's just a templating engine like Smarty http://www.smarty.net/

0

精彩评论

暂无评论...
验证码 换一张
取 消