You are here: Re: Required files confused between applications on same server « PHP Programming Language « IT news, forums, messages
Re: Required files confused between applications on same server

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

On Jul 29, 5:14 pm, Rik <luiheidsgoe...@hotmail.com> wrote:

> On both. PHP has a 'current working dir', the files are searched in the
> include_path, wich usually holds '.' (the current working directory), and
> possibly others. This current working dir is not the directory of the file
> that asks for an include/require, but usually where the process started.
> It can be quite confusing when including several files, so to check what
> the dir is you can use get_cwd();

OK, I'm starting to understand. I've experimented a bit, and when I
access the first app, getcwd() returns c:\windows\system32. However, I
then access the other app, and then when I go back to the first, the
working directory has changed to the root of the second app!

I don't yet understand why the second changes the working directory,
while the first doesn't....the only difference between them is that
the first uses require() while the second uses require_once().

Ray.

 

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

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