Page 1 of 1

mkdir with relative url

Posted: Fri Sep 26, 2008 6:42 pm
by neridaj
Hello,

Is it possible to pass mkdir() a relative url instead of an absolute url? My hosting company decided to change the directory name for the root of a client's usr directory and I've had to update the functions accordingly. If possible I would rather not have functions hardwired to the usr root.

Code: Select all

 
function create_folder($username)
{
    mkdir("/home/.this has been changed/username/domain.com/subdir/$username", 0755);
}
 
 
Thanks,

Jason

Re: mkdir with relative url

Posted: Sat Sep 27, 2008 6:19 am
by VladSun
You may always use getcwd() or realpath().