Reply to Re: PHP Server Paths (Probably OT)

Your name:

Reply:


Posted by dorayme on 02/16/07 07:46

In article <op.tntpstsvqnv3q9@misant>,
Rik <luiheidsgoeroe@hotmail.com> wrote:

> 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,

It would be lovely if it worked for me. because then, there would
be a perfect model on my own home Apache server for the setup at
Optus.

> 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?)
>

Optus say: "All Optus shared web servers are built on a
combination of Windows Server 2003 and Internet Information
Services 6.0 technology... blah blah"

The truth is that I want to work with it and have at least one or
two sites on Windows servers to gain experience and not get all
wobbly and persuade every client to change to Unix (and cheaper
plans usually!). The ky has not fallen in yet. I just would like
to be able to better model the includes business to be quite
portable.

What do you suggest i actually do in plain and strict algorithmic
manner to answer your echo question?

Don't laugh but I added a line toi an html doc that goes:

<?php echo $_SERVER['DOCUMENT_ROOT']; ?>

uploaded the doc to the Optus server and accessed the doc in a
browser and got:

"PHP Warning: main(/includes/footer.inc) [function.main]: failed
to create stream: No such file or directory in
e:\inetpub\esvc000862\globalTest.html on line 13 PHP Warning:
main() [function.main]: Failed opening '/includes/footer.inc' for
inclusion (include_path='.;e:\php') in
e:\inetpub\esvc000862\globalTest.html on line 13"

How do I suck on that?

> > (I post here rather than PHP ng because ...
>
> Tsssk, did they bother you about the include_path directive or something?

No, they are all very nice over there. It is painful letting new
people know how ignorant I am. With you lot, I hide nothing, no
amount of ill treatment deters me. You are a family I cling onto
for better or worse. It's horrible but what can I do? Where can I
go? I am like the battered wife with bad options. It is a total
disgrace but no one will blame me in the end.

--
dorayme

[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

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