i have something like this
$dir = array("http://www.asdf.com/files", "/var/www/html/videos");
how can i check both to see if a certain file exist in one of the two directories, and use whicheverone has it.
if both have the same file, then always use the first directory $dir[0]
I tried using foreach($dir as $directory) {} but all the url end up becoming
http://www.asdf.com/Array/files
where did the Array/ appear from ?
also, I have header(location:"http://www.asdf.com/file). how can i make it check both directories and choose whichever one has the specific file, if both have it, then put priority over the asdf.com directory.
thank you.