All pastes #474130 Raw Edit

Stuff

public text v1 · immutable
·published 2007-05-06 17:14 UTC
rendered paste body
			<?

				//define the path as relative
				$basedir = "/home/derrickk/utvault.com/";
				$path = "files/" . $_REQUEST['path'];
				$fullpath = $basedir . $path;

				//using the opendir function
				$dir_handle = @opendir($fullpath) or die("Unable to open $fullpath"); 
				
				//running the while loop
				while ($file = readdir($dir_handle)) 
				{
					$filelink = $path . $file;
					if($file!="." && $file!=".." && $file!="ut" && $file!="ut2004" && $file!="ut3")
					echo "<a href='$filelink'>$file</a><br />";
				}

				//closing the directory
				closedir($dir_handle);

			?>