You are here: Re: Relative paths in require_once problem (possibly all include routines) « PHP Programming Language « IT news, forums, messages
Re: Relative paths in require_once problem (possibly all include routines)

Posted by AnrDaemon on 12/19/07 23:24

Greetings, Steve.
In reply to Your message dated Monday, December 17, 2007, 17:19:33,

>> BKdotcom has the right answer. Use $_SERVER['DOCUMENT_ROOT'] to get to
>> the root directory of your site, then refer to everything form there.
>>
>> It works on all sites, and requires no modification the php.ini file.

> you only need to have access to the include path defined by the
> php.ini...you do *not* need to modify the php.ini file itself. and
> DOCUMENT_ROOT works great...as long as the resources you're referencing are
> sub-dirs of that dir.

Even if not, using some predefined and known to be right starting point (like
$_SERVER['DOCUMENT_ROOT']), is always a good idea.

Oh, and Michael Fesser have pointed to the same issue.


--
Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru>

 

Navigation:

[Reply to this 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

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