Firstly, the back story
I am setting up web pages like this at the moment:
Code: Select all
<?php include("header.php");?>
<div class="about_title">Article Title</div>
<div class="abour_cont">
Article Content
</div>
<?php include("footer.php");?>A quick test later and I discovered that I can do this another way but it throws up a problem. Currently all the images that I have, including the CSS file, are relitave links. I am loathed to have to rewrite them all and so wondered if there was another way of doing it.
And so to the problem:
How can I take a php file and change all of the links within it and then include it on the page that I am creating. I was thinking about using str_replace but that didn't seam to work.
If anybody has any thoughts then I would be more than grateful and I am sure this could be of use to others who may have the same (or similar) issues.
All the best
Steve