hi ,
i am facing probloem with creating folder online and creating a file inside it using script.
if(! file_exists("../$username"))
{
$oldumask = umask(0);
mkdir("../$username",0755);
chmod ("../$username",0777);
umask($oldumask);
$filename="index.php";
$fp=fopen("../$username/$filename","w");
$body="<";
$body .="?php\n";
$body .="$";
$body .="rid=$rid;\n";
$body .="include(\"../member_page/memberpage.php\");\n";
$body .="?";
$body .=">";
fwrite($fp,$body);
fclose($fp);
}
this code works fine when i used on my won computer and on web server it show some errors.
Warning: SAFE MODE Restriction in effect. The script whose uid is 858 is not allowed to access /home/virtual/site266/fst/var/www/html/bj owned by uid 48 in /home/virtual/site266/fst/var/www/html/control_panel/verifyit.php on line 16
Warning: fopen("../bj/index.php", "w") - No such file or directory in /home/virtual/site266/fst/var/www/html/control_panel/verifyit.php on line 16
Warning: fwrite(): supplied argument is not a valid File-Handle resource in /home/virtual/site266/fst/var/www/html/control_panel/verifyit.php on line 25
Warning: fclose(): supplied argument is not a valid File-Handle resource in /home/virtual/site266/fst/var/www/html/control_panel/verifyit.php on line 26
Warning: Cannot add header information - headers already sent by (output started at /home/virtual/site266/fst/var/www/html/control_panel/verifyit.php:16) in /home/virtual/site266/fst/var/www/html/control_panel/verifyit.php on line 79
plzzzzzzzzzzzzzzzzzz help me
rajiv