Forum Moderators: coopster
if (opendir('\\\\server\\folder\\TEST')){
echo "dir";
} else {
echo "no dir";
}
it always echo's "no dir" I've tried various different ways to do the unc path such as:
//server/folder/TEST
\\\server\folder\TEST
i've even tried mapping the drive on the server
I:\\TEST
and others. I know it's not a permissions issue, I have the folders set to everyone having full control.
// If using WINDOWS, you can use str_replace to change the directory separator:
$dir = $_SERVER['DOCUMENT_ROOT'] . '/subdir1/subdir2';
if (stristr(PHP_OS, 'WIN')) {
$dir = str_replace('/', DIRECTORY_SEPARATOR, $dir);
}