Need to edge out the competition for your dream job? Train for certifications today.
This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.
//define the path as relative
$path = "./";
//extensions NOT showing
$regpattern = '.php$|.html$';
//using the opendir function
$dir_handle = @opendir($path) or die("Unable to open $path");
echo "Directory Listing of $path<br/>";
$filelist = Array();
//running the while loop
while ($file = readdir($dir_handle))
$filelist = $file;
foreach ($filelist as $file)
echo "<a href='$file'>$file</a><br/>";
//closing the directory
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.