It would help to tell us what the "strange" error is.
Without knowing, all I can do is guess that it's a permissions issue, which is often the case when you set up your site using your host login account, but then your PHP scripts are executed by the Apache account. Thus you may have to set read/write/execute for all on the directory where you want your script to create the directory -- which may have security ramifications, so choose wisely where you want this to happen in your directory tree.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
I'm using a MediaTemple Gridserver (shared). The error I receive when i try to use the absolute path is:
Warning: mkdir(): open_basedir restriction in effect. File() is not within the allowed path(s): [GS-BIN PATH HERE] in [SCRIPT PATH HERE]script.php on line 21
Here's the code I'm using:
PHP Code:
chdir("../clients");
mkdir("newfolder",0777);
When I use ./newfolder instead of newfolder I get an already exists error. Not sure what the correct syntax is. All folders have 777 permissions.
Bookmarks