【发布时间】:2012-04-02 21:04:24
【问题描述】:
我正在请求这样一个网站的源代码:
<? $txt = file_get_contents('http://stats.pingdom.com/qmwwuwoz2b71/522741');
echo $txt; ?>
但我想用绝对链接替换相对链接!基本上,
<img src="/images/legend_15s.png"/> and <img src='/images/legend_15s.png'/>
应该替换为
<img src="http://domain.com/images/legend_15s.png"/>
和
<img src='http://domain.com/images/legend_15s.png'/>
分别。我该怎么做?
【问题讨论】:
标签: php hyperlink relative-path