I can read one directory, but I can't read the other and I have no idea why. It should work exactly the same as the previous one and they are in the exact same locations they get called from the same file and it doesn't work so maybe I am missing something. Anyone care to take a moment to take a look.
CMOD properties are the same as well so its not that.
Code that works fine.
$file_dir1 = "../templates";
$dir1 = opendir($file_dir1);
while($file1 = readdir($dir1))
{
if(is_dir($file_dir1."/".$file1) && $file1 != "." && $file1 != ".."){
$templateoption .= "<option value=".$file1." if($myrow[template]==".$file1."){ selected=\"selected\" }>".$file1."</option>";
}
}
Code that doesn't work
$file_dir2 = "../language";
$dir2 = opendir($file_dir2);
while($file2 = readdir($dir2))
{
if(is_dir($file_dir2."/".$file2) && $file2 != "." && $file2 != ".."){
$languageoption .= "<option value=".$file2." if($myrow[language]==".$file2."){ selected=\"selected\" }>".$file2."</option>";
}
}
Both these directories are in the exact same home directory. They get called from the same file.
Here is the Error
Warning: opendir(../language): failed to open dir: No such file or directory in /home/user/public_html/beta/include/admin_functions.php on line 2155
Warning: readdir(): supplied argument is not a valid Directory resource in /home/user/public_html/beta/include/admin_functions.php on line 2156