frosty7700
Programmer
I have a PHP script for uploading and listing files in a Linux filesystem. When listing, I use the following condition:
if eregi("\.",$file) == false
...to determine if an item is a subdirectory or a file. If it is false, it's a subdirectory.
PROBLEM: When I upload a file with no extension on it, it is listed as a subdirectory (even though Linux seems to know knows it's a file just fine). I think I'm missing something obvious, but I can't crack it. Ideas?
if eregi("\.",$file) == false
...to determine if an item is a subdirectory or a file. If it is false, it's a subdirectory.
PROBLEM: When I upload a file with no extension on it, it is listed as a subdirectory (even though Linux seems to know knows it's a file just fine). I think I'm missing something obvious, but I can't crack it. Ideas?