Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/02/2009, 13:31
Avatar de Nickolas28
Nickolas28
 
Fecha de Ingreso: enero-2009
Mensajes: 70
Antigüedad: 15 años, 3 meses
Puntos: 0
no me crea carpeta para iamgenes.

tengo un aplicacion para crear productos, este a la vez crea las carpetas correspondientes para cada uno de ellos, pero el problema, es que en el form cuando le doy para subir una imagen(examinar...), no me crea ninguna carpeta y muchos menos me sube alguna imagen.

el codigo generadoe es:

el campo en html para subirlas es este:

<td>Imagen:</td>
<td><input type="hidden" name="MAX_FILE_SIZE" value="25000"><input type="file" name="imgfile"></td>
</tr>

<tr>

<td>Estado:</td>
<td><label>
<input name="estado" type="radio" value="1" checked>
Activo</label>
<label>
<input type="radio" name="estado" value="0">
Deshabilitado</label></td>
</tr>

<tr>
<td class="titulo">&nbsp;</td>
<td class="titulo">

<input name="NuevoProducto" type="submit" value="Agregar Nuevo Producto"/>
<input name="accion" type="hidden" id="accion" value="nuevo_producto_execute">

</td>
</tr>
</table>
</form>
</div></div>
</div>
<%/if%>

</div>
<%include file="footer.html"%>
</body>
</html>

en el archivo productos_imagenes.php

// Determinamos que images se vera en tamaño original
if(empty($imagen)){
$imagen_principal = $dominio.'/ios2/img/'.$ruta_categorias.$fabricante_nombre.$modelo.$nom bre_imagen_principal;
}
else{
if($imagen=='250.jpg'){
$imagen_principal = $dominio.'/ios2/img/'.$ruta_categorias.$fabricante_nombre.$modelo.$ima gen;
}else{
$imagen_principal = $dominio.'/ios2/img/'.$ruta_categorias.$fabricante_nombre.$modelo."200/".$imagen;
}
}

// Generamos las thumbs
if(!empty($thumbs)){
//agregamos la imagen principal al array
$rutas = $ruta_imagen.$ruta_categorias.$fabricante_nombre.$ modelo;
$arrImagefile[] = $rutas."250.jpg";

//Agregamos las imagenes de la carpeta /200
$ruta= $ruta_imagen.$ruta_categorias.$fabricante_nombre.$ modelo."200";
$f = opendir($ruta);
while($fichero=readdir($f)) {
if ($fichero != "." && $fichero != ".."){
$rutas = $ruta_imagen.$ruta_categorias.$fabricante_nombre.$ modelo.'200';
$arrImagefile[] = $rutas."/".$fichero;
}
}

o sera que en la funcion no esta creando ninguna carpeta llamada "200"?