Ok,
I am trying to learn PHP for fun right now. I wrote this code today to learn readdir()
<?php
$currdir=getcwd();
echo "Current Directory: <br/><strong>$currdir</strong><br/>";
$dir=opendir("$currdir") or die ("Couldn't open directory");
while ($file=readdir($dir)) {
echo "<a href=\"$currdir\\$file\">$file</a><br/>";
}
?>
When loaded in IE7 I get the links but when clicked on nothing happens. If I remove $currdir from the <a> tag I get links that work. What gives?
P.S. Any critique to my code is well appreciated. My feelings won't be hurt 🙂
Thanks!