Jump to content

quick question


paulman888888

Recommended Posts

In the form:

<input type="file" name="image"/>

 

In the script target script:

$destiny_path is where you want the file to be copied, for example:

http://www.yoursite/images/my_image.jpg

 

if ($_FILES['image']['type']=='image/jpeg' || $_FILES['image']['type']=='image/png' || $_FILES['image']['type']=='image/gif') 		

if (!is_file($destiny_path)) {
			copy($_FILES['image']['tmp_name'], $destiny_path);
        else {echo"error: the file exists";}
}

 

 

Link to comment
https://forums.phpfreaks.com/topic/129601-quick-question/#findComment-671881
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.