Reply to relative links in included pages?

Your name:

Reply:


Posted by Pete on 10/24/05 12:40

Hi

i have a page hmenu.htm that acts like a menu bar; containing links to
other pages on my site ie:
<a href="../CMS/sysReq.htm">
<a href="../index.php"> etc

I am includeing this in all of the pages on my site using:
<?php include("includepages/hmenu.htm"); ?>

The pages that use the include are in various levels up to about 4
subdirectories deep.

However, my problem is that as the links are relative, on many of the
pages showing the included file, the links dont work as I am not going
far enough back up the path structure. ie ../index.php on some pages
needs to be ../../index.php etc.

Looking on the net I found suggestions that I might have a hmenu.htm
for each folder level, but that seems to negate the advantage of using
include!

I ahve also found suggestions that I need to put absolute links in ie
www.mydomain.com/index.php. Is that the only way?

Any help appreciated.
Thanks
Pete

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация