I have been instructed to write some PHP scripts and a BAT file to invoke them. I was told that this BAT file is going to be invoked, in turn, by a master BAT file. This got me worrying about all the [man]include[/man] and [man]require[/man] statements. When I include 'someFile.php', where is PHP going to be looking for that file?
Relative to the master BAT file?
Relative to my BAT file?
* Relative to the PHP file?
I wrote a BAT file to invoke two php scripts: one in the directory with the BAT file and one in a subdirectory. Both php scripts tried to include a file called 'include.php' that was sitting in the same directory as the php file. Interestingly, the code in each PHP was evaluated relative to the BAT file rather than the php file.
I have been unable to do another test where I use a Master.BAT file to invoke Test.BAT and dir/Test.BAT because the echo statements of the PHP scripts don't bubble up to the top level.
Can someone help me figure this out. The basic question is If a file, MASTER.BAT, invokes other BAT files which call php scripts, how are relative paths evaluated?
I have attached my last test in a zip file.