puoi impostare $_SERVER['DOCUMENT_ROOT']

$root_file = $_SERVER['DOCUMENT_ROOT']."tua_dir/myfile.dat";