Jump to content

Why Not 2 Images?


luismc2007

Recommended Posts

Hi:

I´m trying to upload 2 files to the server and only one is ok.

The second don´t give me error but don´t upload the file.

I check that the first one is ok, but not the second...

This is the code.

Anyone can help me??

thanks.

 

$fpeque=$_FILES['impeq']['name'];
$fgrande=$_FILES['imgran']['name'];

$arriba_peq="$DOCUMENT_ROOT/libros/";
$arriba_gran="$DOCUMENT_ROOT/libros/grandes/";

$im_p=$arriba_peq.$fpeque;
$im_g=$arrriba_gran.$fgrande;

// first one...sucess
if (copy($_FILES['impeq']['tmp_name'], $im_p))
{
echo"Foto Pequeña OK<br>";
} else
 {
 echo"Foto Pequeña ERROR<br>";
 }

//second... not error but not upload
if(copy($_FILES['imgran']['tmp_name'], $im_g))
{
echo"Foto grande OK<br>";
} else
 {
 echo"Foto grande ERROR<br>";
 }

Link to comment
https://forums.phpfreaks.com/topic/270976-why-not-2-images/
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.