Okay thanks feyd. Yeah it's amazing what a little reading can do, and I'm ignorant not to read before I post. Reading the comments on the mkdir() php.net page told me to scratch the "/". in my mkdir statement.
My script now looks like:
Code: Select all
//creates the users directory if it does not exists already
if ((!file_exists("eyecons/".$_SESSION[username])) && (!is_dir("eyecons/".$_SESSION[username]))) {
mkdir("eyecons/".$_SESSION[username]);
}
works great! Not that I know what you mean when you say
As an aside, always quote named array indices unless they are a constant:
using $_SESSION[username] apposed to $_SESSION['username'] works the same with me. So I ask, what would the benefit be in using the quotes?
I don't mean to get into debate. But just curious in the reason I should be doing this, so I'd kick myself in doing it more frequently.
Thank you everyone for your efforts. You made this a fantastic thread.