Reply to Re: Determining document root when $_SERVER['DOCUMENT_ROOT'] is not an option

Your name:

Reply:


Posted by laredotornado@zipmail.com on 06/26/07 20:38

On Jun 26, 3:26 pm, ZeldorBlat <zeldorb...@gmail.com> wrote:
> On Jun 26, 3:55 pm, "laredotorn...@zipmail.com"
>
> <laredotorn...@zipmail.com> wrote:
> > Hi,
>
> > We're using PHP 4.4.4 with Apache 2 on Linux. Aggravatingly, the
> > hosting company has done something to where $_SERVER['DOCUMENT_ROOT']
> > no longer returns the path to the web root directory. I have now gone
> > through all my code and replaced $_SERVER['DOCUMENT_ROOT'] with a
> > constant, DOC_ROOT. Now, the challenge is to define the constant.
>
> > Suggestions?
>
> > One important thing. The file the constant will be defined in is not
> > necessarily going to be a file at the web root level.
>
> > Thanks for all your help, - Dave
>
> Does you web root change? Are you planning on deploying the software
> to another server? If the answer is no just hard code it in some
> configuration file. You do have a configuration file of sorts for
> database connection parameters and such, right?

We do have a config file for the db connection stuff, but the problem
is on our dev server, the site is located one level down from the web
root and on the live site it is located at the same level. So it
would be great to find an expression to cover both situations.

Thanks, -

[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

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