type check while uploading


Posted on 16th Feb 2014 07:03 pm by admin

Hi Everyone,

How can I check the exact type of a file while uploading on my site?

Here is the scenario:
I have allowed only .jpg, .gif, .png files to be uploaded on my site. Suppose an user renames his .exe file with .jpg file. In this case, how can I prevent it to be uploaded on the server?

Please suggest..

No comments posted yet

Your Answer:

Login to answer
286 Like 50 Dislike
Previous forums Next forums
Other forums

Query failed issue with php script but works fine in mssql manager!
hi i have the script below which copies data from one table to another but will only insert new data

for some reason mysql query not working, not inserting, please check it out
This code is not inserting anything into my db, don't know why, the $_SESSION variable does contain

array_combine() trouble w/csv file
I have a problem with a piece of code I wrote to import some records from a csv file into mysql. I h

Include with Parameters
In a particular page I would like to include a file that requires $_GET parameters.

when I go

SQL Injection
In my attempts to protect my database from mySQL injection I have created another problem for myself

Extracting Long text from message class with parameters
Hi,

I would like to extract the long text from a message class. However, the long text ha

preg-match with a string and numbers
Hi, I can't get the expression to work for my preg_match, what I'd like is for it to match the strin

filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I h

Recognising Revenue daily
Hello.
Has anyone come across daily recognition of deferred income?
We want to implement R

Xacute search within SQL results
I have a query that is pulling data, and I want to return a specific value from the results of that

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash