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

Posted by dorayme on 02/16/07 20:48

In article <tfbga4-1l4.ln1@ophelia.g5n.co.uk>,
Toby A Inkster <usenet200702@tobyinkster.co.uk> wrote:

> dorayme wrote:
>
> > <?php include ($_SERVER['DOCUMENT_ROOT'].'/includes/footer.inc'); ?>
>
> Unless you're moving files about *a lot*, or you enjoy including files
> that include files that include files...

I don't and I don't.

>just use relative paths. Easy.
>
> <?php include './../../includes/footer.inc'; ?>
>

Which is exactly what I am doing on the Optus Windows server. But
not as easy as with the

<?php include ($_SERVER['DOCUMENT_ROOT'].'/includes/footer.inc');
?>

construction I use on my own server on this here machine nor on
other external Unix servers I maintain websites on.

As I understand it, this above construction relieves me of having
to work out the path to the includes folder on a per file basis.

The point of me wanting all this is not just to save a bit of
work but to be able to model the websites I have on Windows
servers on my own server here on the Mac. I get to keep one
website folder this way, not a number of them to suit different
servers...

> Personally, I prefer to create an includes directory, put it wherever the
> hell I like (perhaps even outside the document root!) and include files
> like this:
>
> <?php include 'footer.inc'; ?>
>
> So how does PHP know where footer.inc is kept? By setting the
> "include_path" setting in "php.ini", ".htaccess", "httpd.conf"
> or similar. Of course, if you are on shared hosting, you may
> need to check that it is possible for you to adjust the
> include_path.

I am sort of following you here, the trouble is that I am a bit
lost over fine controls over the Windows servers concerned. They
are external and I do not _seem_ to have access to htaccess,
httpd.conf type thingies and before me is a horrible option,
having to ask Optus something and how the hell to phrase it and
let total strangers place me on an Andy Dingley scale of
cluelessness and get it wrong to boot. Even a martian has his
pride.

--
dorayme

 

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

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