Hi, I currently have a setup where I use a main php file that serves as the layout template for my website's pages. It's standard html but uses php bits like this for example:
<?php $contentfile = "./content/" . $id . ".txt"; include($contentfile);?>
What this bit does is simply add the content taken from a text file in my "content" directory. The "$id" variable is determined by the url.
So far, no problem. My next step is to replace all URLs in each content file. I dont want any php in these files so I tried the following:
<?php $contentfile = "./content/" . $id . ".txt"; include($contentfile); $path = str_replace("artoffact.php","aof.php",$path); ?>
The goal here was to replace all href tags that called artoffact.php with aof.php.
But it doesnt work
Can anyone help?
Thanx!