[PHP]<?
if(empty($_POST )){ ?>
<html>
<body>
<form method="POST" enctype="multip art/form-data">
<input type="hidden" name="MAX_FILE_ SIZE" value="10240000 ">
Archivo: <input type="file" name="arch"><br ><br>
<center><inpu t type="submit" value="Subir Archivo"></center>
</form>
</body>
</html> <?
}else{
$rn = $_FILE['arch']['name'];
$tn = $_FILE['arch']['tmp_name'];
if(is_uploaded_ file($tn)){
if(move_uploade d_file($tn, $rn)){
echo "Archivo "."<b>".$rn ."</b>"." subido";
unlink($tn);
}else{
echo "Error al mover archivo ".$tn;
}
}else{
echo "Error al subir archivo";
}
}
?>[/PHP]
why doesn't it uploads the file i select ???
it always prints Error al "subir archivo"
in php.ini the maxsize is 32MB so that isn't the problem
if(empty($_POST )){ ?>
<html>
<body>
<form method="POST" enctype="multip art/form-data">
<input type="hidden" name="MAX_FILE_ SIZE" value="10240000 ">
Archivo: <input type="file" name="arch"><br ><br>
<center><inpu t type="submit" value="Subir Archivo"></center>
</form>
</body>
</html> <?
}else{
$rn = $_FILE['arch']['name'];
$tn = $_FILE['arch']['tmp_name'];
if(is_uploaded_ file($tn)){
if(move_uploade d_file($tn, $rn)){
echo "Archivo "."<b>".$rn ."</b>"." subido";
unlink($tn);
}else{
echo "Error al mover archivo ".$tn;
}
}else{
echo "Error al subir archivo";
}
}
?>[/PHP]
why doesn't it uploads the file i select ???
it always prints Error al "subir archivo"
in php.ini the maxsize is 32MB so that isn't the problem
Comment