Hi,
when i use this code:
<?
if(!file_exists("$Formusername"))
{
(mkdir("$Formusername", 0777));
$contents = "\n<head>\n</head>\n\n<body>\n<input type='hidden' name='Formusername' value='<?php echo($Formusername);
?>'>\n</body>\n";
$fp = fopen("/home/supracore/public_html/smac/test1/$Formusername/index.php","w+");
chmod ("/home/supracore/public_html/smac/test1/$Formusername/index.php", 0777);
if ($fp)
{
fwrite($fp, $contents);
fclose($fp);
}
}
else
{
print("<p>Error in script setup. Please notify the website administrator.");
}
?>
i can create a directory and put a file in that directory dynamically but these are just tests. Now when I try to delete these files and folders from the web server, it won't let me saying that permission is denied even for the file that has chmod 777.
Can anyone help ?
Thanks in advance,
Steve