Reply to Re: OT. Windows server paths and PHP includes

Your name:

Reply:


Posted by Adrienne Boswell on 06/17/07 16:04

Gazing into my crystal ball I observed dorayme
<doraymeRidThis@optusnet.com.au> writing in news:doraymeRidThis-
33C704.19215517062007@news-vip.optusnet.com.au:

> For many web sites hosted on Unix servers I use (happily) a
> construction like this for includes:
>
><?php include ($_SERVER['DOCUMENT_ROOT'].'/includes/footer.inc');
> ?>
>
> But this does not work on Windows servers. Does anyone know a
> likely other candidate expression that will tell the server to go
> to the level at which I have the site index file and look inside
> a folder called 'includes'? No matter where it appears deep
> inside the website directories?
>
> It sort of spoils the point to be tailoring each path to where
> the html file happens to be with "../"s (which, of course,
> "works").
>
> I know, I have wondered about this before and never really got
> anywhere. Seem unable to have used any previous remarks to
> advantage or have now forgotten them.
>

It's a security issue, designed to keep attackers from getting to
sensitive files on the file system. In IIS6, parent paths are disabled by
default. The only way to get past it is to get the server admin to
change it.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

[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

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