Page 1 of 1

Create folder

Posted: Thu Jan 29, 2004 9:08 pm
by S_henry
When somebody login into the system for the first time, I want the system create a folder automatically base on their 'login' as a folder name. Anyone has any idea?

Posted: Thu Jan 29, 2004 9:17 pm
by Gen-ik

Code: Select all

<?php
mkdir ("/path/to/my/dir", 0700);
?>
:: [php_man]mkdir[/php_man]

Posted: Tue May 24, 2005 11:08 pm
by S_henry
I've tried this code to create folder and its work if i run the code on my local machine. The problem is the folder is not created if i run the code from the server, even after i change the folder setting to 777 (read, write, execute). Anybody got any idea pls?

Posted: Wed May 25, 2005 3:40 am
by Black Unicorn
Make sure that PhP on your webserver has the proper permissions to create folders.
I had the same problem once but solved it by changing the folder's ownership (CHOWN) to `httpd` or something.

Hope it helps.
H