Foros del Web » Programando para Internet » PHP »

Por que no me crea las imagenes

Estas en el tema de Por que no me crea las imagenes en el foro de PHP en Foros del Web. Miren este script: Código PHP: global  $dirthumb ;    $path  =  getcwd ();    $pathtodir  =  substr ( substr ( $path , 0 ,- 1 ...
  #1 (permalink)  
Antiguo 11/02/2005, 12:09
Avatar de Reynier  
Fecha de Ingreso: noviembre-2002
Ubicación: Por ahí en algún sitio
Mensajes: 1.844
Antigüedad: 21 años, 5 meses
Puntos: 1
Por que no me crea las imagenes

Miren este script:
Código PHP:
global $dirthumb;
  
$path getcwd();
  
$pathtodir substr(substr($path,0,-1),0,strrpos($path,"\\"));
  
$files = array();
  if (
$handle opendir($pathtodir.$dirthumb)) {
   while (
false !== ($file readdir($handle))) {
    if (
$file != "." && $file != "..") {
     if (
eregi("\.jpe?g$"$file) || eregi("\.gif$"$file) || eregi("\.png$"$file)){
      
$files[] = $file;
     }
    }
   }
   
closedir($handle);
  }
  
sort($files);
  foreach (
$files as $image) {
   if(
file_exists($pathtodir.$dirthumb.$image)){
    
$size getimagesize($pathtodir.$dirthumb.$image);
    
$width  $size[0];
    
$height $size[1];
    
$im imagecreatefromjpeg($pathtodir.$dirthumb.$image);
    
$img imagecreatetruecolor($width,$height);
    
imagejpeg($im$pathtodir.$dirthumb.$image100);
    
imagedestroy($im);
   }
  } 
el directorio donde estan las imagenes tiene contenido porque el arreglo $files[] se me llena esta vez con 3 ficheros que he comprobado los nombres y son los que estan en el directorio, pero sorpresa en el navegador no me salen las imagenes alguna ayuda al respecto.
Salu2
__________________
Ing. Reynier Pérez Mira
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 05:36.