searching directories
Posted: Wed May 18, 2005 4:16 pm
I neen to write a script to "audit" email accounts on my website. All the accounts should have a number in them that coresponds to the users employee ID. For example John Smith has employee IF 105, his email account is john105@xxx.com.
Now I have all the directories and I am retrieving a list of inactive people from my database and I am trying to check if a directory with thier name+id exsists, but I am having troubles, here is how I am trying it
Nothing is happening even if I do
but I can do
A better solution if anyone can help me is to just have a function that says "Is there a directory that contains '105' in it?" and return that directory.
Thanks if you can offer any help!
Now I have all the directories and I am retrieving a list of inactive people from my database and I am trying to check if a directory with thier name+id exsists, but I am having troubles, here is how I am trying it
Code: Select all
$checkDir = "e;/home/xyz/mail/xyzmail.com/"e;.$inactiveї"e;firstName"e;].$inactiveї"e;id"e;];
if(is_dir($checkDir))
{
printf("e;<tr><td>%s %s</td><td>%s</td><td>%s</td><td>%s%s</td></tr>"e;,
$inactiveї"e;firstName"e;], $inactiveї"e;lastName"e;], $inactiveї"e;plsid"e;], $inactiveї"e;emailAddress"e;],
$inactiveї"e;firstName"e;], $inactiveї"e;id"e;]);
}Code: Select all
echo is_dir('$checkDir');Code: Select all
echo is_dir('/home/xyz/mail/xyzmail.com/john105');Thanks if you can offer any help!