Ofir Attia Ofir Attia - 7 months ago 66
PHP Question

Sql file extension type

What is the sql extension type?

I want to upload to some folder in my server only .sql files.

I know that for txt is text/plain. what is for sql files?

if($_FILES['userfile']['type'] != 'THE SQL EXTENSION'){
echo ' File is not an sql file.';



There is no special MIME type for SQL. Just use application/octet-stream.

See @Vroo's answer below (application/sql). Since RFC6922 was published, this answer is no longer correct.