Spaces:
Configuration error
Configuration error
Download config/database.php from brucelloyd1/lost-found-tracker-pro: direct link, hf CLI and curl.
- Browser
- Download file 601 Bytes
-
https://huggingface.co/spaces/brucelloyd1/lost-found-tracker-pro/resolve/main/config/database.php
- Command line
-
hf download hf://spaces/brucelloyd1/lost-found-tracker-pro/config/database.php
-
curl -L -o database.php https://huggingface.co/spaces/brucelloyd1/lost-found-tracker-pro/resolve/main/config/database.php
601 Bytes
| ```php | |
| class Database { | |
| private $host = "localhost"; | |
| private $db_name = "lost_and_found"; | |
| private $username = "root"; | |
| private $password = ""; | |
| public $conn; | |
| public function getConnection() { | |
| $this->conn = null; | |
| try { | |
| $this->conn = new PDO("mysql:host=" . $this->host . ";dbname=" . $this->db_name, $this->username, $this->password); | |
| $this->conn->exec("set names utf8"); | |
| } catch(PDOException $exception) { | |
| echo "Connection error: " . $exception->getMessage(); | |
| } | |
| return $this->conn; | |
| } | |
| } | |
| ``` |