![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
17/05/2004, 13:51
|
| | Fecha de Ingreso: mayo-2004 Ubicación: Canarias
Mensajes: 17
Antigüedad: 20 años, 8 meses Puntos: 0 | |
Perdonen, pero esto sigue sin funcionarme. El código es el siguiente:
<?php
$uploaddir = $_SERVER['DOCUMENT_ROOT'];
$uploadfile = $uploaddir . $_FILES['userfile']['name'];
print "<pre>";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
print "File is valid, and was successfully uploaded. ";
print "Here's some more debugging info:\n";
print_r($_FILES);
} else {
print "Possible file upload attack! Here's some debugging info:\n";
print_r($_FILES);
}
print "</pre>";
?>
<form enctype="multipart/form-data" action="subef.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="3000" />
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>
Pero siempre me da un fallo, y no se por qué puede ser. |