It should be safe, considering that it won't run. This:
$site_path="$root$path[dirname]";
should be:
$site_path = $root . $path['dirname'];
Also "global" is used in functions, not in the "normal" scope. When you include a file, variables in it (outside of functions) come into the scope of the including file, so it's not necessary here anyway. Also, you should use quotes around variable key names to prevent possible run-time confusion with like-named constants.
After you fix all that it should still be safe.