hola tengo este script que me permite subir varios archivos a la ves, el problema es no puedo cambiarles el nombre por ejemplo que se llamen foto1, foto2 y asi sucecivamente òdrian ayudarme?bueno muchas gracias aca les dejo el script
<?php
define("DESTINATION", "c:\\upload\\");
define("UPLOAD_NO", 10);
echo("<p align='center'><b><font size='4'>MultiUP<br> by npguy, [email protected]");
if($REQUEST_METHOD!="POST")
{
print "<form enctype=\"multipart/form-data\" method=post>\n";
print "<INPUT TYPE=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"3000000\">\n";
for($i=1; $i<=UPLOAD_NO; $i++)
{
echo "<input type=file name=infile$i> ";
if($i%2==0)
print"<br>";
}
echo "<br><br><input type=submit value=upload></form>\n";
}
else
{
/* handle uploads */
$noinput = true;
for($i=1; $noinput && ($i<=UPLOAD_NO); $i++)
{
if(${"infile".$i}!="none") $noinput=false;
}
if($noinput)
{
print "<big><B>Error uploading. Try again.</B></big>";
exit();
}
echo("<p align='center'><b><font size='4'>Successfully Uploaded<br>");
echo("<table border='1' width='84%' height='52' bordercolorlight='#008080' bordercolordark='#008080'>
<tr>
<td width='14%' bgcolor='#008000' height='21'><font color='#FFFFFF'><b>Sn</b></font></td>
<td width='52%' bgcolor='#008000' height='21'><font color='#FFFFFF'><b>Filename</b></font></td>
<td width='34%' bgcolor='#008000' height='21'><font color='#FFFFFF'><b>Size</b></font></td>
</tr>");
for($i=1; $i<=UPLOAD_NO; $i++)
{
$a=1;
$just=filesize(${"infile".$i});
$fp_size[i] = $just;
if(${"infile".$i}!="none" &&
copy(${"infile".$i}, DESTINATION.${"infile".$i."_name"}) &&
unlink(${"infile".$i}))
{
echo("<tr>
<td width='14%' height='19'>$i</td>
<td width='52%' height='19'>${"infile".$i."_name"}</td>
<td width='34%' height='19'>$fp_size[i]</td>
</tr>
");
}
$a++;
}
echo "</table>";
}
?>