PHP mkdir recursive with parents

Reply to comment

what about:

mkdir($_SERVER['DOCUMENT_ROOT'] . _PATH . '/' . $directory, 777, true);