Files in '.$directory.'http://'.$directory.'Files in the directory '.$directory.'en-us'; if ($handle = opendir('./')) { /* This is the correct way to loop over the directory. */ while (false !== ($file = readdir($handle))) { if (($file != '.') && ($file != '..') && ($file != $this_file)){ echo ''; echo '<![CDATA['; echo htmlentities($file); echo ']]>'; echo ''; echo 'http://' . $directory . $file; echo ''; echo 'http://'.$directory . $file .''; echo ''; } } closedir($handle); } echo ''; ?>