Jump to content

Php uploader


Chikwado

Recommended Posts

If you understand what the script is doing, then you will know which part to change so that it will work for files other than images.

 

This line is the one that checks if the file is an image:

$check = getimagesize($_FILES["fileToUpload"]["tmp_name"]);

From the PHP manual: http://ca1.php.net/getimagesize

Link to comment
Share on other sites

Ok, Is it possible to do it like this:

$check=getimagesize($_FILES
['fileToUpload']['tmp_name']);
//To add html and php document
$check=getphpsize($_FILES
['fileToUpload']['tmp_name']);
Edited by Chikwado
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...