Foros del Web » Programando para Internet » PHP »

error en cometchat

Estas en el tema de error en cometchat en el foro de PHP en Foros del Web. hola, ya me tiene cansado el localhost de que me tire errores en todo el script de cometchat, mas o menos lo fui adaptando al ...
  #1 (permalink)  
Antiguo 29/01/2012, 15:17
 
Fecha de Ingreso: agosto-2011
Ubicación: Argentina
Mensajes: 46
Antigüedad: 12 años, 7 meses
Puntos: 0
error en cometchat

hola, ya me tiene cansado el localhost de que me tire errores en todo el script de cometchat, mas o menos lo fui adaptando al sistema de mi web y ya mas o menos anda, solamente tengo un error que no se que tiene qué me tira este error.

Cita:
Parse error: syntax error, unexpected T_IF, expecting T_FUNCTION in C:\AppServ\www\cometchat\php4functions.php on line 466 y otras lineas mas
Código:
if (class_exists('PEAR_Error')) {

    class Services_JSON_Error extends PEAR_Error
    {
        function Services_JSON_Error($message = 'unknown error', $code = null,
                                     $mode = null, $options = null, $userinfo = null)
        {
            parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
        }
    }

} else {
    class Services_JSON_Error
    {
        function Services_JSON_Error($message = 'unknown error', $code = null,
                                     $mode = null, $options = null, $userinfo = null)
        {

        }
    }

}
if( !function_exists('json_encode') ) {
	function json_encode($data) {
        $json = new Services_JSON();
        return( $json->encode($data) );
    }
}
if( !function_exists('json_decode') ) {
	function json_decode($data) {
        $json = new Services_JSON();
        return( $json->decode($data) );
    }
}

if (!function_exists('str_ireplace')) {
	function str_ireplace($find,$replace,$string)
	{
	    if(!is_array($find))
	        $find = array($find);
	        
	    if(!is_array($replace))
	    {
	        if(!is_array($find))
	            $replace = array($replace);
	        else
	        {
	            $c = count($find);
	            $rString = $replace;
	            unset($replace);
	            for ($i = 0; $i < $c; $i++)
	            {
	                $replace[$i] = $rString;
	            }
	        }
	    }
	    foreach($find as $fKey => $fItem)
	    {
	        $between = explode(strtolower($fItem),strtolower($string));
	        $pos = 0;
	        foreach($between as $bKey => $bItem)
	        {
	               $between[$bKey] = substr($string,$pos,strlen($bItem));
	               $pos += strlen($bItem) + strlen($fItem);
	        }
	        $string = implode($replace[$fKey],$between);
	    }
	    return($string);
	}
}
necesito saber como arreglar eso,ese codigo viene del archivo php4functions.php muchas gracias

Última edición por marcoss2009; 29/01/2012 a las 15:49
  #2 (permalink)  
Antiguo 30/01/2012, 07:36
Avatar de ZiTAL  
Fecha de Ingreso: marzo-2004
Ubicación: Bermio (Bizkaia)
Mensajes: 1.545
Antigüedad: 20 años, 1 mes
Puntos: 62
Respuesta: error en cometchat

sube a pastebin el fichero completo:

C:\AppServ\www\cometchat\php4functions.php

http://pastebin.com

y luego pega el link para poder echarle un vistazo
__________________
http://zital.no-ip.org
____________________

Euskerie ahuen eta bijotzan

Etiquetas: codigophp, cometchat
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 21:11.