Hi,
I'm trying to create a script that find whether directory names in an array don't exist on the server. Here's what I have:
However, the output from this is wrong. It returns some folders that are on the server and also doesn't show some folders which aren't on the server. I know is_dir works on the server cos I've used it in another script. Could it be that the size of the $value_array is about 50, might be doing some weird timeout or something on the server.
I also tried !opendir and !chdir instead of !is_dir but still outputs the same wrong data.
I'm trying to create a script that find whether directory names in an array don't exist on the server. Here's what I have:
Code:
foreach($value_array as $val) {
if (!is_dir("/home/virtual/" . $val["Domain"])) {
echo "The folder: " . $val["Domain"] . " is not on the server";
}
}
However, the output from this is wrong. It returns some folders that are on the server and also doesn't show some folders which aren't on the server. I know is_dir works on the server cos I've used it in another script. Could it be that the size of the $value_array is about 50, might be doing some weird timeout or something on the server.
I also tried !opendir and !chdir instead of !is_dir but still outputs the same wrong data.