lifeasalounge Posted October 5, 2006 Share Posted October 5, 2006 I am using this code: Code: if ($result_b) { $userdir = 'userpages\\'.$username; $imagedir = 'userpages\\'.$username.'\images'; if (file_exists($userdir)) { echo 'this directory already exists.'; } else { $makedir = mkdir($userdir, 777); $makedirimages = mkdir($imagedir, 777); copy('defaultfiles\defaultindex.php', $userdir.'\index.php'); if ($makedir) { echo 'dir created'; } else { echo 'error creating dir'; } $idfile = "userpages\\".$username."\userid.txt"; $idfile = fopen($idfile, 'a'); fwrite($idfile, '&userid='.$userid.'&username='.$username.'&'); fclose($idfile); } } It works perfectly on my computer. When i uploaded it to my website here on 100webspace, instead of creating a folder inside a folder it create a folder called 'rossmurphy/images' and instead of copying a file inside a folder it chages the file name to 'userpages/rossmurphy/userid.txt' when this should be the directory to the file. Does anyone know how i can fix this? Has anyone had a similar problem? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.