Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/07/2006, 10:37
Avatar de seik!
seik!
 
Fecha de Ingreso: mayo-2006
Mensajes: 492
Antigüedad: 18 años
Puntos: 6
aumentar capacidad del upload?!

Hola tengo el siguiente codigo y me gustaria ver como aumentar la capacidad del upload... ya modifique los comandos del php.ini y no pasa nada...

Código PHP:
<?php
        
// Configuración //
        ///////////////////
        // $extensiones=array("1ªext","2ªext","....");
        // Aqui debes poner las extensiones que NO admitas
        // por ejemplo si no quieres admitir .html , .exe ni .gif :
        // $extensiones=array("html","exe","gif");
        ///////////////////////////////////////
        
$extensiones=array("");
        
/////////////////
        // $path="/ruta/ta/ta";
        // Si el server rula bajo LinuX toda la ruta completa /var/etc/..
        // Si rulas bajo WindoWs C:/midirectorioroot/tal..
        // Nota: Sin el último / ej: C:/miweb NO C:/miweb/
        ////////////////
        
set_time_limit(600);
        
$path="C:/Inetpub\wwwroot\sec2\oficios";
        
$nombre=$HTTP_POST_FILES['archivo']['name'];
        
$tamanio=$HTTP_POST_FILES['archivo']['size'];
        
$tipo=$HTTP_POST_FILES['archivo']['type'];
        
$var explode(".","$nombre");
        
$num count($extensiones);
        
$valor $num-1;
        
            for(
$i=0$i<=$valor$i++) {
                if(
$extensiones[$i] == $var[1]) {
                echo 
"<center><table> 
                    <tr>
                        <td height='100' width='30' class='ti_12_negro' ></td>
                    </tr>
                    <tr>
                        <td height='40' width='330' align='center' class='ti_12_negro' bgcolor='#CCFFFF'>Archivo no admitido</td>
                    </tr>
                    <tr>
                        <td height='30'></td>
                    </tr>
                    <tr>
                        <td height='40' width='330' align='center'><input type='button' class='button' name='cmdsalir' value='Salir' onclick='javascript:window.close();'></td>
                    </tr>
                    </table>"
;
                    exit;
                }
            }
        
        
$nombre_archivo $_POST["num_oficio"].substr($nombrestrlen($nombre) - 44);
        
            if (
is_uploaded_file($HTTP_POST_FILES['archivo']['tmp_name']))
                 {
                  
copy($HTTP_POST_FILES['archivo']['tmp_name'], "$path/$nombre_archivo");
                  echo 
"<center>
                    <table> 
                        <tr>
                            <td height='100' width='30' class='ti_12_negro' ></td>
                        </tr>
                        <tr>
                            <td height='40' width='330' align='center' class='ti_12_negro' bgcolor='#CCFFFF'>Datos ingresados correctamente!</td>
                        </tr>
                        <tr>
                            <td height='30'></td>
                        </tr>
                        <tr>
                            <td height='40' width='330' align='center'></td>
                        </tr>
                    </table>"
;
                 }
            else
                     { 
                 echo 
"<center>
                    <table> 
                        <tr>
                            <td height='100' width='30' class='ti_12_negro' ></td>
                        </tr>
                        <tr>
                            <td height='40' width='330' align='center' class='ti_12_negro' bgcolor='#CCFFFF'>Error al subir el archivo</td>
                        </tr>
                        <tr>
                            <td height='20'></td>
                        </tr>
                        </table>"
;
                    }
?>
espero puedan ayudarme ;)
__________________
sEIK! -Chile-
Analista Programador.