Warning: lstat failed for test.txt (errno=2 - No such file..

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
giaCo
Forum Newbie
Posts: 7
Joined: Thu Dec 02, 2004 6:34 am

Warning: lstat failed for test.txt (errno=2 - No such file..

Post by giaCo »

Warning: lstat failed for test.txt (errno=2 - No such file or directory) in /public_html/t/code.php on line 27

I am getting this warning when trying to dsplay items in a folder.

The line of code the warning is referring to is:
$DirOrFile = filetype($file);



This initially worked fine but now is giving me a warning!

Does anybody have any idea how this could be resolved? Any help would be hugely appreciated!!!!

Thanks
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

folder name might not be same in real and in script
giaCo
Forum Newbie
Posts: 7
Joined: Thu Dec 02, 2004 6:34 am

Post by giaCo »

It is returning the correct filenames, such as test.txt, and it is executing properly-just getting the warnings!!!

Is there anything else that could possibly be causing it?
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

may be a path prob. see to it
Post Reply