Jump to content

uploadfiles


leonphp

Recommended Posts

I have this code that used to work.

 

But it doesnt work no more....  anyone has the answer?

 

#copy images

$uploadfolder="/pacotes/";

 

 

#file1

$uploadedfile=$_FILES['file1']['tmp_name'];

$finalfile=$_SERVER['DOCUMENT_ROOT'].$uploadfolder.$id."_big.jpg";

if(!copy($uploadedfile,$finalfile)) echo "erro no upload do ficheiro 1";

 

#file2

$uploadedfile=$_FILES['file2']['tmp_name'];

$finalfile=$_SERVER['DOCUMENT_ROOT'].$uploadfolder.$id.".jpg";

if(!copy($uploadedfile,$finalfile)) echo "erro no upload do ficheiro 2";

 

#file3

$uploadedfile=$_FILES['file3']['tmp_name'];

$finalfile=$_SERVER['DOCUMENT_ROOT'].$uploadfolder.$id."_hover.jpg";

if(!copy($uploadedfile,$finalfile)) echo "erro no upload do ficheiro 3";

Link to comment
https://forums.phpfreaks.com/topic/130930-uploadfiles/
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.