You are here: Re: PHP Server Paths (Probably OT) « HTML « IT news, forums, messages
Re: PHP Server Paths (Probably OT)

Posted by Rik on 02/16/07 04:08

On Fri, 16 Feb 2007 02:03:07 +0100, dorayme
<doraymeRidThis@optusnet.com.au> wrote:

> On a Unix server, including the server on my Mac, you can use
>
> <?php include ($_SERVER['DOCUMENT_ROOT'].'/includes/footer.inc');
> ?>
>
> in any html doc at any level (at least at any level at or below
> the normal /public_html) and the footer appears fine in any
> browser and with the folder "includes" (containing the footer
> markup) at almost any level.
>
> In order to get php includes working on a Windows server, I
> manage by stating the detailed path to the folder. This involves
> more careful vetting of all the paths in the various folders and
> sub folder. It would be nice to have some construction that
> worked like with a Unix server. Any suggested strategies please?

As long as it's accessed by the web-server, $_SERVER['DOCUMENT_ROOT']
should still work, I use it here on W2K all the time. If this does not
work for you, what's the actual content of $_SERVER['DOCUMENT_ROOT'] if
you echo it? And are you using Apache or ISS (or a totally different
server?)


> (I post here rather than PHP ng because they seem altogether too
> technical for it to be useful to me... though I might try. I
> think I may have asked something similar in the past but the fact
> is I am no nearer a solution. Just be a bit neater not to have to
> vet all the paths...)

Tsssk, did they bother you about the include_path directive or something?

--
Rik Wasmus

 

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

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