Reply to Re: Relative versus Absolute Path Problem

Your name:

Reply:


Posted by Ken LE PRADO on 07/18/05 09:34

In all my websites, I have a config file with the base url path (ex :
$baseDir='http://toto.com/site' ) and a function makeUrl();

When I need to make an absolute link, I use my function
makeUrl('/dir1/file1.php') and it output http://toto.com/site/dir1/file1.php
This is used for example in the menus, or headers that are called in
every pages, but not in the pages that just include some files.

Why don't use just a link to '/dir1/file1.php' ? Just because it is the
dir for the root path, and you don't have allways access to a root path.

Ken

[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

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