Tried clearstatcache(); and it still is giving me the Warning: SymLink failed (file exists) for .....
Here's the code.
if ($getpathinfo[0]=="Y") {
$linkarray=explode("/",$getpathinfo[1]);
if(is_dir("/usr/www/audiofai/httpd/htdocs/shopcart/products/$dirdate")) echo "DE";
else { mkdir("/usr/www/audiofai/httpd/htdocs/shopcart/products/$dirdate", 0755);
} if(is_dir("/usr/www/audiofai/httpd/htdocs/shopcart/products/$dirdate/$namedir")) echo "DE";
else { mkdir("/usr/www/audiofai/httpd/htdocs/shopcart/products/$dirdate/$namedir", 0755);
}
clearstatcache(); if(is_link("/usr/www/audiofai/httpd/htdocs/shopcart/products/$dirdate/$namedir/$linkarray[1]")) echo "LE";
else {
echo "Checked for link at /usr/www/audiofai/httpd/htdocs/shopcart/products/$dirdate/$namedir/$linkarray[1]\n";
symlink("/usr/www/audiofai/httpd/htdocs/shopcart/cantshowyouthis/$getpathinfo[1]", "/usr/www/audiofai/httpd/htdocs/shopcart/products/$dirdate/$namedir/$linkarray[1]");
}
echo "<a href=\"products/$dirdate/$namedir/$linkarray[1]\">$getpathinfo[2]</a><br>\n";
}
else {
echo "\n";
}
Hope that survives the post. Anyway Some of the echos are there for debugging. All of the directory creation works, but the symlink checking does not. Am I missing something simple, I've been over this sooo many times.