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