here's the problem. i'm using mkdir to check and see if a folder exists and if not create it and if so add files to it. here is the dilemma, up until now i had all of my files just sitting in the root directory ie: / and it would create the folder in /folder/created folder. now i have moved all my function, config files to a /includes/config folder. the problem i am having is that: $newdir = "data/".substr($newfilename, 0, 2); <-- worked when i had all files in root directory changed to this in order to create the files in my root directory: $newdir = "../../data/".substr($newfilename, 0, 2); <--- doesn't work any ideas how to correct this?
just did a chdir() to the root directory right before the mkdir... so it would switch directories to / and then create the folder in data/new_folder