Jump to content

Uploading Files


Isityou

Recommended Posts

I'm trying to upload a file but it is not moving the file from the temp to the specified folder ('../images').

 

$target_path = '../images/';
if(is_uploaded_file($_FILES['imagefile']['tmp_name']))
{
if(move_uploaded_file($_FILES['imagefile']['tmp_path'], $target_path))
{
	// Good, it uploaded
}
else
{
	die ('<p class="error">FILE MOVE ERROR</p><br /><input type="button" value="Back" onclick="javascript:history.back()" />');
}
}
else
{
echo 'Error, must be uploaded via website.';
}

Link to comment
https://forums.phpfreaks.com/topic/93585-uploading-files/
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.