p5y Posted August 30, 2014 Share Posted August 30, 2014 so im trying this $file is not a .txt file if ($file != "." && $file != ".." && !is_dir("uploads/$fuser/$file") && (pathinfo("uploads/$fuser/$file", PATHINFO_FILENAME)!= "txt") i tried this but doesnt work Link to comment https://forums.phpfreaks.com/topic/290742-check-if-extension-true/ Share on other sites More sharing options...
CroNiX Posted August 30, 2014 Share Posted August 30, 2014 did you try to echo pathinfo("uploads/$fuser/$file", PATHINFO_FILENAME) to see what the value is? I bet its a full filename and not just the extension. Probably want to be using PATHINFO_EXTENSION there Link to comment https://forums.phpfreaks.com/topic/290742-check-if-extension-true/#findComment-1489345 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.