Quantcast
Channel: Fatal error desconocido PHP - Stack Overflow en español
Viewing all articles
Browse latest Browse all 2

Fatal error desconocido PHP

$
0
0

Pues estaba trabajando en PHP y me sale un mensaje en la linea 69 del documento actual:

Fatal error: in C:\xampp\htdocs\prueba\php_pruebas\app\config\database.php on line 69

public function Connect($host, $dbname, $user, $pass)    {        $this->host = htmlspecialchars($host);        $this->dbname = htmlspecialchars($dbname);        $this->user = htmlspecialchars($user);        $this->pass = htmlspecialchars($pass);        if (strlen($this->dbname) > 2 && strlen($this->dbname) < 50) {            $this->dbname = filter_var($this->dbname, FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP);        } else {            return false; # Pendiente de excepcion            $this->error .= 'Error en la dbname';        }        if (strlen($this->user) > 2 && strlen($this->user) < 50) {            $this->user = filter_var($this->user, FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP);        } else {            return false; # Pendiente de excepcion            $this->error .= 'Error en el usuario';        }        if (!$this->error || empty($this->error)) {            $this->conexion = new PDO('mysql:host=' . $this->host . ';dbname=' . $this->dbname, $this->user, $this->pass); -> linea 69            return $this->conexion;        }    }

Viewing all articles
Browse latest Browse all 2

Latest Images





Latest Images