Hi everyone,
I'm trying to find a way to extract just the extension from a local file. Basically, I have a bunch of files I want authenticated users to be able to download. As it is, I have the save dialog box pop up for every file by specifying an unrecognized file type as the content type. This works great.
However, I want PDF files to load in the browser window instead of prompt with the save dialog. So, basically, I need to know if the file is a PDF file or not.
So, say the file is test.file.pdf. How would I go about trimming the string from the left to the last period?
I can't find anything on this in the PHP manual.
Thanks =)