proper usage of glob()
<p>Is this the correct way to us glob() i'm trying to do a case insensitive search for the folder <strong>TestFolder</strong> on the server.</p>

<pre><code>$chid = "testFoLdER";
$dirchk2 = "/temp/files/" . glob('".$chid."') . "/" . $data[1] . ".doc";
</code></pre>

<p><strong>@code_burgar</strong> I made these changes to apply to the example code_burgar showed me. is this correct?
what i'm trying to do here is what ever globistr find for casing, rename the folder to lowercase. </p>

<pre><code>$chid = (strtolower($_POST['chid']));
$findbatch = globistr($chid);
$results = glob($findbatch);

if ( !empty($results) ) {
  $result = $results[0];
  rename("/temp/files/" . $results . "/", "/temp/files/" . strtolower($chid) . "/");
} 
else 
{
    $missing_dir = 'Folder containing files, Not Found: ' . $chid . "\r";
    $errfile = fopen("/rec/" . $chid . "-errlog.txt", "a");
        fwrite($errfile, $missing_dir . "\n");
        fclose($errfile);
        exit();                           
}
</code></pre>
