PHP opendir() - 如何获取一步UP的文件列表?

A simple thing to do. Want to change the XAMPP page view with an addition so that, all the project folders can be viewed on the home page (like the WAMP). I's following this blog post and it's working fine (though the whole thing din't match exactly). I made a link to the projects.php page on the left nav area, and on-click I can get all my project folders.

But I want all the projects list on the home page, no further menu click. So I tried, but failed. I tried with these code (I'm using XAMPP 3.2.1).

But with the code, I can't get it done. I'm confused with two pieces of code there:

$handle = opendir(".");

and

if ( is_dir($file) && ($file != "..") && ($file != ".") ) {

As I'm now dealing with new folder structure, I tried using: $handle = opendir("../"); — but it's always missing the htdocs folder.

I even tried simple way like (in htdocs/xampp/index.php):

<frame name="content" src="start.php" marginwidth=20>
<frame name="content" src="../projects.php" marginwidth=20>

But eventually failed.

And also tried:

$rp = realpath('../'); //showing: C:\xampp\htdocs
$handle = opendir("$rp"); //but opening the directory C:\xampp\htdocs\xampp