fileatime() error message

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

fileatime() error message

Post 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
sad2891
Forum Newbie
Posts: 9
Joined: Sat Nov 02, 2002 8:38 pm
Location: Orlando, Florida

Using opendir and readdir

Post 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;
?>
Post Reply