im putting this post here to remember this important function to show the full path of a script, i use this to display the path of my install script so that i know where the user is installing their script.

CODE
$script_filename = getenv('PATH_TRANSLATED');
if (empty($script_filename)) {
	$script_filename = getenv('SCRIPT_FILENAME');
}
	$script_filename = str_replace('\', '/', $script_filename);
	$script_filename = str_replace('//', '/', $script_filename);
	$dir_fs_www_root_array = explode('/', dirname($script_filename));
	$dir_fs_www_root = array();
	for ($i=0, $n=sizeof($dir_fs_www_root_array)-1; $i<$n; $i++) {
		$dir_fs_www_root[] = $dir_fs_www_root_array[$i];
	}
$dir_fs_www_root = implode('/', $dir_fs_www_root) . '/'; 


to show it in your html, just put this:

PHP CODE:
<?php echo $dir_fs_www_root . 'install/myfile.sql'; ?>