Anyone know of how i can get the type of file?
ex :
function ("file.ccc");
Return
"ccc"
Any help would be cool
Mahjoub zitoun
the ".ccc" is an extention.
$filename="hallo.pl"; echo substr($filename,strrpos($filename,".")+1);
Which means: print the substring of $filename, starting at one position after the last occurance of "." in $filename.
hi,
try the command "file file.ccc". this works fine on any UNIX & clones... thik you can use this command with the system() fn & test the output of the return value. certainly this is a way out... or try is_file(), is_link(), is_executable() etc.... but, obviously, there is more than one way to do it...
good luck... ptbabu