Jump to content

Screening files to open using file_get_contents()


Recommended Posts

Hi,I'd also like to screen what kind of files i'd be opening using the 'context' option
As in, I don't want to exclude files that way specifically, as the logic designed to filter files is located in a different object...What I do want to do is exclude non-text-based files because that is a universal specification. As in, i don't want to say "no .pdf, .wmv, or .avi files" or "only .htm, .php, and .html files" but no non-textual files. Perhaps I could use something with MIME types for this?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...