>>615
自己回答ですが、

$imgdir = "img/";
$str = $imgdir;
$str2 = "../".$imgdir;
$body = str_replace($str,$str2,$body);

これでもまだスマートじゃ無い気がしてきています。