Jump to content

[SOLVED] Read dir()..


A JM

Recommended Posts

How can I eliminate the root paths from being read using thedir() function?

 

<?php $path = "../claims/" . $row_rstocdetail['maxclaimnum'] . "/";
							$dir = dir($path);
							while($file = $dir->dir())
							{
								 echo '<a href="' . $file . '">' . $file . '</a><BR>';
							}?>

 

The files that come out are as follows:

 

.

..

myfilename1.txt

myfilename2.txt

... etc.

 

how can I eleiminate the first 2 items and just list the filenames?

 

myfilename1.txt

myfilename2.txt

... etc.

 

Thanks.

 

A JM, :)

Link to comment
https://forums.phpfreaks.com/topic/164326-solved-read-dir/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.