'find'ing a file via php?
| From: | Vince LaMonica | Date: | Sat, 02 Sep 2000 00:47:50 +0000 |
| Subject: | 'find'ing a file via php? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-2380@lists.php.net to get a copy of this message | ||
Hi gang,
I have a weird one for y'all. I need to read the contents of an ini file
into php. No problem there. The problem is that the ini file might be
...well, *anywhere* on the user's hard drive. It has to exist where the
program is kept, ie: D:\files\myprogram.exe and D:\files\myprogram.ini but
other than that, it could be anywhere. There could also be a network copy
of the file, but not of the exe file.
So I can do an if/then as far as looking for a directory that contains
both myprogram.ini and myprogram.exe, but I haven't a clue as to how to
locate this directory in the first place! Is there a way to use the
window's 'find file' and/or the unix 'find' command to locate the
directory that 'myprogram.exe' is located in?
I know I could maintain a 2nd copy of the .ini file for php4 in a certain
directory, but it would be nice to not have to remember to change both
files.
TIA,
/vjl/ [who's going to spend this weekend coding...]