So if you got errors, you should ALWAYS post them here. It's really helpful to know what exactly "isn't working" means.
Try this modified one...it might help you figure out what your path should be by reporting some information. It also displays an error message if you can't open your path.
<?php
// it might be helpful to know where the current file is located
// in order to properly enter the path of your directory:
echo 'THIS FILE:' . __FILE__ . '<br>';
// since you gave a relative path rather than an absolute path
// it is going to be evaluated relative to this path location:
echo 'the current working directory is ' . getcwd() . '<br>';
$the_path = 'public_html/lounge/feat';
if ($handle = opendir($the_path)) {
while (false !== ($file = readdir($handle))) {
echo "$file\n";
}
closedir($handle);
} else {
echo 'UNABLE TO OPEN ' . $the_path . '<br>';
}
?>