Click here for Toll-Free Service for your business starting at $2.00 per month

Main Menu

how to mkdir()

Started by robot, August 23, 2006, 09:46:20 AM

Previous topic - Next topic


i have this simple code put on test,
mkdir($path0755)){print "folder created";}else{print "failed";}

but it doesn't seem to work, what could be wrong?
how do i create a new folder with php code?


Please review the information on the website.

(You need to use the directory PATH not the URL)

Thank you, Admin


allright, now i understand that i need to use the dir path instead of url.
my question now is what is the dir path to my account ?



just change the username


finally i could create new directories. however, i could remove the folder and file i created, this the error i get
Warning: unlink(/fpgs/fpgshttpd/ultra/blog/My_Profile/index.php) [function.unlink]: Permission denied in /home/admin/ on line 22
Deleting of folder failed.

This might be caused by insufficient permissions.

how do i remove it? I could not change the folder permission too, came out with a chmod failed error


you would use rmdir() to remove a directory.

also you could try not using the second parameter on mkdir or setting 0777

and make sure you delete the file(s) within the folder first