Thats what I am looking for but now I have another problem, I am looking to use this to create script simlar t a file mangager, ie it lists the folders and create links to the same page but browsed to that folder. I am looking to pass a Query String $path which will contain the folder name. Here is my script:
<?
if (!$path){
$thepath = ".";
}else{
$thepath = "./$path/";
}
$d = dir("$thepath");
echo "<P>";
while($entry=$d->read()) {
if(is_dir($entry))
{
echo "<img src=\"folder03.gif\" width=\"20\" height=\"20\" align=\"absmiddle\"> ";
echo "<font size=\"1\"><b><font face=\"Verdana, Arial, Helvetica, sans-serif\" color=\"#003399\"><a href=\"listpages.php?path=$entry\">$entry</font></b></font><BR> ";
}
}
$d->close();
I am running PHP 4 on win32 (soon to migrate tp linux) + Apache
When no path all is fine and list the folders in the current dir, if i click on a folder it will only show some of the folders in that dis (usually 2). I know that I will not be able to go any further in the directory structure at the minute but any help on this will be welcome
Marcus