Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/07/2009, 20:03
iovan
 
Fecha de Ingreso: septiembre-2007
Ubicación: PyRoot
Mensajes: 1.515
Antigüedad: 16 años, 7 meses
Puntos: 188
Respuesta: Impedir subir extenciones

si

subir.php
Código PHP:
<?php
if (isset($_POST['enviar'])
{
    
$ext $_FILES['archivo']['type'];
    if (
$ext == "text/php" || $ext == "text/html")
      {
         
// Subir al servidor
       
} else {
       
// No se sube al servidor
        
echo "El archivo seleccionado no es PHP o HTML porfavor verifique...";
      }

}
?>
<html>
<form action="" method="post" enctype="multipart/form-data">
<input type="file" name="archivo" />
<input type="submit" name="enviar" value="subir" />
</form>
</html>

Es todo saludos.!
__________________
Si quieres agradecer el triangulo obscuro de la parte derecha debes presionar +.