Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/12/2008, 14:19
nan_do9
 
Fecha de Ingreso: febrero-2006
Ubicación: Quito
Mensajes: 68
Antigüedad: 18 años, 2 meses
Puntos: 0
imagen para captcha no funciona

que tal foro miren este script me funciona en forma local pero cuando subo al sevidor (Centos 5 ) no me funciona ahí les dejo el código

Código PHP:
class c_funciones
{
    
    function 
__construct()
    {
    
    }
function 
f_captcha($length) {
    
$pattern "1234567890abcdefghijklmnopqrstuvwxyz";
    for(
$i=0;$i<$length;$i++) {
      
$key .= $pattern{rand(0,35)};
    }
    return 
$key;

------------------------------------
Código PHP:
include_once('../class/c_funciones.php');
        
$o_funciones=new c_funciones;
      
$tmptxt=$o_funciones->f_captcha(8);
      
$_SESSION['tmptxt'] =$tmptxt
      
$captcha imagecreatefromgif("bgcaptcha.gif");
      
$colText imagecolorallocate($captcha000);
      
imagestring($captcha5167$_SESSION['tmptxt'], $colText);
      
header("Content-type: image/gif");
      
imagegif($captcha); 
para cargar la imagen en el formulario
<img src="captcha.php" width="100" height="25" >

como les indico me funcioan en forma local pero en el server no sale la imagen
cual es el problema.??

Saludos
Fernando