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

how to remove in php string display
My code is

$message="We're looking at developing our website.";

$body= "

Appending GET data with form submition
Okay, what I'm trying to do is to use a form to append an already existing GET data string.

I

Remove letter from numeric textbox
I have a textbox that will search the employee database by entering in the employee ID and it will r

Passing JS to PHP
So I have the following
Code: <?php
getdetails(?><script type="text/

Progress bar for webpage
Hi,
I want to implement a progress/waiting bar on my webpage - exactly the same thing that the Mi

Echo multiple lines of html code
Hi guys,

I would like to know if there is a way to echo multiple lines of html codes.

EU VAT Package 2010
Does any one know whether SAP will be developing new reporting functionality due the new VAT rules t

downloading a file as HTML
Hi.
I'm rather confused with forcing a download. I just want to save dynamic content (from $_SESS

Filename like the user name
I am creating a form and storing the values in file. Could anyone please tell me how to write a code

Having Problem with Date
l have a submit buttom where user have the possibility to add a date to specify when his message s

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