hi

a piece of code i have requires a files location and name for it to retrieve its content. instead of hard coding it i would like to simply have a window open that enables me to select it from my directory. is there a way i can do this using php?

thanks

Member Avatar for rajarajan2017
<?php
$dir = "../dani/";
if ($handle = opendir($dir)) {
	while (false !== ($file = readdir($handle))) { 
		if ($file != "." && $file != "..") { 
				echo "<a href=\"../dani/" . $file . "\">" . $file . "</a><br>"; 
		}
	} 
}
	closedir($handle); 
?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.