line 60 and 61 should read:

echo 'temp/'.$userfile_name[$i-1];
$fp=fopen('temp/'.$userfile_name[$i-1],"w+");


Andres, Cyrille wrote:

here is my code :

// for each file to upload :....
$j=0;
echo "$hotelNr[$j] et $j";
while($hotelNr[$j] != "")
{
//display the caracteristics of each file to download
echo"<br>HOotelNr[$j]=$hotelNr[$j]<br>";?>
<table border="1">
<tr><td><?php printf("<b>Name</b> :</td><td>
%s",$userfile_name[$hotelNr[$j]-1]);//
$HTTP_POST_FILES["userfile"]["name"]);?></td></tr>
<tr><td><?printf("<b>Temporary Name :</b></td> <td>%s",
$userfile[$hotelNr[$j]-1]
);//$HTTP_POST_FILES["userfile"]["tmp_name"]);?></td></tr>
<tr><td><?printf("<b>Size :</b></td><td>%s",
$userfile_size[$hotelNr[$j]-1]
);//$HTTP_POST_FILES["userfile"]["size"]);?></td></tr>
<tr><td><?printf("<b>Type :</b></td><td>%s",
$userfile_type[$hotelNr[$j]-1]);//$HTTP_POST_FILES["userfile"]["type"]);?></
td></tr>


<tr><td>
<?

//copy the file on the server
$i=$hotelNr[$j];
echo "temp/$userfile_name[$i-1]";
$fp=fopen("temp/$userfile_name[0]","w+");

if (copy
($HTTP_POST_FILES["userfile"]["tmp_name"][$hotelNr[$j]-1],"temp/".$HTTP_POST
_FILES["userfile"]["name"][$hotelNr[$j]-1]))
printf("<h4>File successfully copied !</h4>");
else
printf("<h4>Error: failed to copy file !</h4>");

$j++;
echo "</td></tr>
</table><br>";
}
?>

-----Original Message-----
From: Stuart Dallas [mailto:stuart@;stut.net]
Sent: Wednesday, October 30, 2002 11:29 AM
To: Andres, Cyrille
Cc: Jonathan Sharp; PHP List; php
Subject: Re: [PHP] parse error


On Wednesday, Oct 30, 2002, at 19:21 Europe/London, Andres, Cyrille wrote:

thx, but I still have the same error
I think I have a poltergheist in my computer !!!

Show us a couple of lines before this.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to