Ver Mensaje Individual
  #1 (permalink)  
Antiguo 20/01/2004, 07:43
fdominguez2
 
Fecha de Ingreso: julio-2003
Mensajes: 3
Antigüedad: 20 años, 9 meses
Puntos: 0
input type=file y php error con archivos de 1 mega

Hola a todos mi problema es el siguiente:
Utilizo un input type =file para subir un fichero a mi servidor pero cuando el archivo ocupa 1 mega me sale una pagina de error
"The page cannot be displayed", me da la impresion de que ni siquiera lee mi codigo php , en cambio si pongo un archivo pequeno funciona perfecto.
SOLUCION???
Me he jartao de modificar el PHP.ini y na de na...

El codigo es :

<form name="form_transferer" method="post" action="revendeurs.php" enctype="multipart/form-data">
<br>
<br>
<table>
<tr>
<td>
<font color=ff6600>
<b>
EXTRANET.TXT :
</b>
&nbsp;&nbsp;&nbsp;
</td>
<td>
<input name="file" type="file" size="15" maxlength="115" style=" background-color: #FFFFFF; color: #FF0000; font-family: Tahoma; font-size: 8 pt">
</td>
</tr>
<tr>
<td>
<font color=ff6600>
<b>
DETAIL.TXT :
</b>
&nbsp;&nbsp;&nbsp;
</td>
<td>
<input name="file2" type="file" size="15" maxlength="115" style=" background-color: #FFFFFF; color: #FF0000; font-family: Tahoma; font-size: 8 pt">
</td>
</tr>
<tr>
<td colspan=2 align=center>
<input type="submit" name="VALIDER2" value="VALIDER" style=" background-color: #0099CC; color: #FFFFFF; font-family: Tahoma; font-weight: bold; font-size: 8 pt">
&nbsp;&nbsp;&nbsp;
<input type="submit" name="LOGOUT" value="LOGOUT" style=" background-color: #0099CC; color: #FFFFFF; font-family: Tahoma; font-weight: bold; font-size: 8 pt">

</td>
</tr>
</FORM>
</table>
<br>
<br>




<?

IF ($VALIDER2){


if ($file == "none" or $file2 == "none"){ /* KO file */
print "<b>Vous n'avez pas sélectionné de fichier... Veuillez préciser !<br>";
} /* fin KO file */


else { /* OK */
if (!$host = ftp_connect("*******")){
print "<b>Hôte impossible à contacter !<br></b>";
exit();
}

if (!$host = ftp_login($host, "*******", "******")){
print "<b>Connection non autorisée</b>";
exit();
}

if (!$chdir = ftp_chdir($host, "/home/extranet/amplitude/extranetdata/")){
print "<b>Impossible d'accéder au répertoire de l'utilisateur...<br></b>";
exit();
}

if (!$put = ftp_put($host, "/home/extranet/amplitude/extranetdata/extranet2.txt", $file, FTP_ASCII)){
print "<b>Impossible de transférer les données de l'utilisateur...<br></b>";
exit();
}
if (!$put = ftp_put($host, "/home/extranet/amplitude/extranetdata/detail.txt", $file2, FTP_ASCII)){
print "<b>Impossible de transférer les données de l'utilisateur...<br></b>";
exit();
}


print "<b>le transfert du fichier $filename s'est bien déroulé.<br></b>";

} /* fin du else OK */

}
?>

Última edición por fdominguez2; 20/01/2004 a las 07:44