chet Posted April 9, 2003 Share Posted April 9, 2003 I installed htmlArea in the catogories.php for making the description easyer for the products. I have one problem with this. It automatically converts relative addresses to absolute ones, so if I'm working at my home computer and synchronize with my website the link to the images are wrong. Example: http://localhost:1080/catalogus/images/test.jpg should be catalogus/images/test.jpg On the forum from Interactivetools there is no solution for this. I only found one solution but I don't know where to put these lines; I use a PHP server side function to remove the domain information : <?php function trim_domain($text) { return str_replace('http://'.$_SERVER['HTTP_HOST'], '', $text); } ?> Basically this function should be applied before insrting data in the database. It removes the domain information within the text using the domain currently used. Example: if your admin function runs on http://www.whatever.com/admin/my_page.php this function will remove any 'http://www.whatever.com' it finds within the text. Does anybody knows where to put these lines. I tried in catogories.php but that doesn't work. Thanks for helping. I think this would be a great solution to all if we can find a solution. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.