neridaj Posted September 26, 2008 Share Posted September 26, 2008 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. function create_folder($username) { mkdir("/home/.this has been changed/username/domain.com/subdir/$username", 0755); } Thanks, Jason Link to comment https://forums.phpfreaks.com/topic/126005-mkdir-with-relative-url/ Share on other sites More sharing options...
discomatt Posted September 26, 2008 Share Posted September 26, 2008 Relative paths are fine... but why not just use $_SERVER['DOCUMENT_ROOT'] ? Link to comment https://forums.phpfreaks.com/topic/126005-mkdir-with-relative-url/#findComment-651614 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.