Reply to Re: Required files confused between applications on same server

Your name:

Reply:


Posted by Ray on 07/29/07 16:03

On Jul 28, 10:40 pm, Rik <luiheidsgoe...@hotmail.com> wrote:

> Both apps asume they know where they are running, which is bad, very bad.
> No fault/bug in PHP, just careless coding.

Actually, inexperience :-) as I'm (relatively) new to PHP.

> Usually I solve this problems bij require(dirname(__FILE__).'/config.php');

My mistake was assuming that require(....) takes the current URL root
as its starting point - for example, if the app is running at
http://www.myserver.ie/myapp then require('config.php') would look for
config.php at http://www.myserver.ie/myapp/config.php.....but you're
saying that it's actually looked for at the physical filesystem
location on the server (c:\documents and settings\....etc....
\config.php) - am I correct?

The other thing that I can't understand is why one app should
interfere with another in this way - is this an IIS thing, or can it
happen on Apache also?

Many thanks for your help.

Ray.

[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

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