Member Avatar

I have a script that registers users and i want to implement in it this function to make for each user a folder with the name they supply so i used $user_folder = mkdir($_SERVER['HTTP_HOST'].'/user/'.$name, 0755); $name is the name they supplyed in the form so i get this "Warning: mkdir() [function.mkdir]: No such file or directory in /home/public_html/registration/index.php on line 139" Why?

Member Avatar
+0 forum 4
Member Avatar

Hi, I can't seem to find the answer I'm looking for online (maybe keywords are too common?). Is my code only verifying whether my directory is created? Or is it actually validating? I need it to validate, but I'm unsure whether or not it's doing that. $dirPath = $_POST['company']; $result = mkdir($dirPath, 0755); if ($result == 1) { echo '<br/>'.$dirPath . " has been created".'<br/>'; } else { echo '<br/>'.$dirPath . " has NOT been created".'<br/>'; } Upon a second submission with the same company name and uploaded image, I get this error: Warning: mkdir() [function.mkdir]: File exists in /home/***/***/***/formulaires/processForm-test.php …

Member Avatar
+0 forum 6
Member Avatar

Hi everyone, looking for some advice please. I had a mkdir working great on a shared hosting account I had, I have since moved from a shared hosting account to a virtual dedicated server, now the mkdir is not working as previous. Before i moved server is was using a simple [code] //make directory using the users id and the last id mkdir("products/$id/$lastid",0777); [/code] I have tried many different ways trying to get the above to work like it did on the shared hosting. All the information is being sent to mysql correctly, but no directory is being created in …

Member Avatar
+0 forum 1
Member Avatar

[code]#include <direct.h> int main(){ mkdir("C:\\Program Files\\Bacon"); }[/code] Creates a folder in the folder that the .exe file is in, and is called "Program FilesBacon". I think it's obvious what I wanted it to do. Help please? I'm using codeblocks if it matters.

Member Avatar
+0 forum 2
Member Avatar

I'm not sure if this is possible. Basically, I have a function that will detect the current active user. [CODE]string currentUser() { string user; ofstream outf("CurrentUser.dat", ios::trunc); system("whoami >> CurrentUser.dat"); outf.close(); ifstream inf("CurrentUser.dat"); inf >> user; return user; }[/CODE] I have another function which will create a directory in the user's computer. The path will be: /Users/*ActiveUser*/Library/Application Support. Now, I have a data file containing only the name of the current active user. How can I insert that into a system command such as: [CODE]system("mkdir \"/Users/ActiveUserGoesHere/Library/Application Support\"");[/CODE] If I read the contents of the data file into a string or …

Member Avatar
+0 forum 4
Member Avatar

Hi there, I've search all over the internet on how to list a directory in PHP but failed to do so. I've seen other php scripts but it didn't have the features I want. Do you have something like this: 1. It allows you to display all the directories and files in a directory. 2. It allows uploading of files in the directory. 3. It allows you to create a directory, or inside the direcotry to make it sub-directory. 4. Finally, It allows you to delete a directory. Hope I found something like this specification. Thanks in Advance! :)

Member Avatar
+0 forum 2
Member Avatar

Hello! I am trying to make this work. [CODE]//make user folder $userid = $_SESSION['loginid']; $userdir = "./u/".$userid."/"; if (!is_dir($userdir)) { mkdir($userdir,0777); copy("/home/users/web/b681/ipg.xxxx/shack/u/index.php","/home/users/web/b681/ipg.xxxx/shack/u/".$userid."/index.php"); echo "Your directory was created. This is where all your files will be stored.<br>"; } else echo "";[/CODE] This part of the code is Ok but it does not copy the file over to the created folder. Anyone would like to help me on this? Trying to copy the /u/index.php to /u/$userdir/index.php Sincerely, Sorcher

Member Avatar
+0 forum 6
Member Avatar

Hi, I trying to create some dirs like this: [CODE]@mkdir("photos/$cat/$sku", 0777, true)[/CODE] it creates the first directory with 0777 permissions, but when it creates the second is uses 000 as it's perms, so it fails to create the third. A workaround this please? Thanks, Richard.

Member Avatar
+0 forum 1

The End.