Page 1 of 1

fileatime() error message

Posted: Thu Oct 24, 2002 12:47 pm
by kendall
Hello ,

i am trying to write a script that list the file folders in a directory

i get this message
Warning: stat failed for folder2 (errno=2 - No such file or directory)

but it will output the listing and it will output the stats for it

what is the problem here

Kendall

Using opendir and readdir

Posted: Sat Nov 02, 2002 9:26 pm
by sad2891
Would this help at all?

Code: Select all

<?php

$this = "";
$handle = opendir('.'); 
while (false !== ($file = readdir($handle))) &#123; 
	if ($file != "." && $file != "..") &#123; 
		if (!strrpos($file, ".")) &#123;
       			$this .= " ".$file."|";
		&#125;
	&#125; 
&#125;
closedir($handle); 

$that = explode("|", $this);

rsort ($that);
reset ($that);

for ($num=0; $that&#1111;$num]; $num++) &#123;
	$temp = trim(strstr($that&#1111;$num], ' '));
	$pathed = "/".$temp."/";
	echo "<a href="$pathed">$temp</a><br>";
&#125;
?>