This is the right way for us glob () I'm trying to make case insensitive for the TestFolder folder on the server.
$chid = "testFoLdER"; $dirchk2 = "/temp/files/" . glob('".$chid."') . "/" . $data[1] . ".doc";
@code_burgar I applied these changes to an example that showed me burgar_code. It's right? what I'm trying to do here is what globistr ever finds for a shell, rename the folder to lowercase.
$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(); }
source share