Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/01/2012, 14:29
rodri_tobi
 
Fecha de Ingreso: junio-2011
Mensajes: 15
Antigüedad: 13 años, 9 meses
Puntos: 1
Exclamación Error en un linea (Upload)

Bueno resulta que estoy creando mi propio servidor y nececito ayudar por que me salta este error

Notice: Undefined index: Action in C:\Servidor dedicado\htdocs\Vip\Drake\index.php on line 3

Este es el codigo que da error

Código PHP:
if ($_POST["Action"] == "upload") { 
el codigo completo

Código PHP:
<?php
$status 
""
if (
$_POST["Action"] == "upload") {
    
        
$tamano $_FILES["archivo"]['size'];
    
$tipo $_FILES["archivo"]['type'];
    
$archivo $_FILES["archivo"]['name'];
    
$prefijo substr(md5(uniqid(rand())),0,6);
    
    if (
$archivo != "") {
        
$destino =  "files/".$prefijo."_".$archivo;
        if (
copy($_FILES['archivo']['tmp_name'],$destino)) {
            
$status "Archivo subido Con Exito!: <b>".

$archivo."</b>";
        } else {
            
$status "Error al subir el archivo";
        }
    } else {
        
$status "Error al subir archivo";
    }
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859

-1" />
<title>Upload Gamers 1.1</title>
<link href="estilo.css" rel="stylesheet" type="text/css" />
</head>
<body>

<center><table width="413" border="0" cellspacing="0" 

cellpadding="0">
  <tr>
    <td width="413" height="40" class="titulo"><center>Upload Gamers 

1.1</center></td>
  </tr>
  <tr>
    <td class="text"><center>Por favor seleccione el archivo a 

subir:</center></td>
  </tr>
  <tr>
  <form action="index.php" method="post" enctype="multipart/form-

data">
    <td class="text">
      <input name="archivo" type="file" class="casilla" id="archivo" 

size="35" />
      <input name="enviar" type="submit" class="boton" id="enviar" 

value="Upload Gamer" />
      <input name="action" type="hidden" value="upload" />      

</td>
    </form></center>
  </tr>
  <tr>
    <td class="text" style="color:#990000"><?php echo $status; ?

></
td>
  </
tr>
  <
tr>
    <
td height="30" class="subtitulo"><center>Lista de Archivos 

subidos de tu servicio
</center></td>
  </
tr>
  <
tr>
    <
td class="infsub">
    <?
php 
    
if ($gestor opendir('files')) {
        echo 
"<ul>";
        while (
false !== ($arch readdir($gestor))) {
           if (
$arch != "." && $arch != "..") {
               echo 
"<li><a href=\"files/".$arch."\" 

class=\"linkli\">"
.$arch."</a></li>\n";
           }
        }
        
closedir($gestor);
        echo 
"</ul>";
    }
    
?>    </td>

</table>
</body>
</html>