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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.