I'm having a small issue here with my php where I'm trying to create a directory but when the code is ran I get the error message
Warning: mkdir() [function.mkdir]: No such file or directory
Can anyone give me some guidance as to where I'm going wrong here?
<?
function generateRandomString($length = 10) {
$characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
return $randomString;
}
$Key = generateRandomString();
if(is_dir("Server1/".$Key) === true){
header("Refresh:0");
}
else
{
mkdir("Server1/".$Key);
echo $Key;
}
?>
Server1existsServer1/Server1/$key