Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/11/2008, 18:44
elalmacen60
 
Fecha de Ingreso: mayo-2008
Mensajes: 111
Antigüedad: 15 años, 11 meses
Puntos: 1
problema con clases en servidor web

hola amigos, se me presento un problema. tengo una web que funciona a la perfeccion en mi servidor local. cuando la subo al servidor de ******** me tira el siguiente error.

Fatal error: Cannot instantiate non-existent class: mysql in /home/jp000436/public_html/test/vdppanel/functions/common.php on line 5

la linea 5 es la siguiente
$mysql = new mysql();
esta linea esta perfecta. Bueno espero que alguin me pueda ayudar, les adjunto toda la clase common

Código:
<?php
global $path;
include_once($path."constants/main.php");

$mysql = new mysql();

function __autoload($class_name) {
	global $path;
    require_once $path."class/".$class_name.".php";
}

function cpSwich($post=null,$get=null) {
	global $HTTP_SESSION_VARS;
	//Si eligen salir.
	if($get['salir']){ session_unset(); }
	
	//si existe session.
	if($HTTP_SESSION_VARS['idUser']){
		//mostrar la pagina
		new pageSwitch($post,$get);
	}else{
		//mostrar el loguin form
		new login($post);		
	}
}

function array2obj($arg_array) {
		$tmp = new stdClass; // start off a new (empty) object
		foreach ($arg_array as $key => $value)
		{
			if (is_array($value)) { // if its multi-dimentional, keep going :)
				$tmp->$key = arr2obj($value);
			} else
			{
				if (is_numeric($key)) { // can't do it with numbers :(
					die("Cannot turn numeric arrays into objects!");
				}
				if($value)
					$tmp->$key = $value;
			}
		}
		return $tmp; // return the object!
	}
function array2ExistingObj($arg_array,$obj) {

		foreach ($arg_array as $key => $value)
		{
			if (is_array($value)) { // if its multi-dimentional, keep going :)
				$obj->$key = arr2obj($value,$obj);
			} else
			{
				if (is_numeric($key)) { // can't do it with numbers :(
					die("Cannot turn numeric arrays into objects!");
				}
				if($value!="" || $value==0)
					$obj->$key = $value;
			}
		}
		return $obj; // return the object!
	}



?>