Help - Search - Members - Calendar
Full Version: Fopen() And Fwrite() Problems
Zymic Webmaster Forums > Zymic Free Web Hosting > Zymic Free Web Hosting - General Discussion & Help
ruuska
Hi, I've got this site where you can register and when you do i want to create a subfolder with you'r username and a index.php file in that folder.

This is my code:
CODE

mkdir("../$user", 0777);

$filename = '../'.$user.'/index.php';
$filecontent = 'lots of php crap that will be index.php';

$file = fopen($filename, "w");
fwrite($file, $filecontent);
fclose($file);


So, the folder is created properly but fopen() function gets an error that says:
CODE
Warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The script whose uid is 2003 is not allowed to access /www/uuuq.com/b/l/o/blogline/htdocs/ruuska2 owned by uid 2001 in /www/uuuq.com/b/l/o/blogline/htdocs/libs/functions.inc.php on line 244


Please help me! tongue.gif
aoi_azzura
I'm having problem with them myself.
mkdir() seemed to be restricted by safemode.
And you have to be the sysadmin to lift the safemode.
The same thing goes with fopen()
Ed
Pop onto IRC, i'll fix the permissions for you.

It'll have to be later today (GMT) now though as I'm going to bed soon.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.