From 75438d3b6c46f9566ff7f6a9657dda7cdfbf9a6d Mon Sep 17 00:00:00 2001 From: filippo.bertilotti <filippobertilotti@gmail.com> Date: Wed, 15 May 2024 09:36:01 +0200 Subject: [PATCH] questo permette alla classe database di crearsi solamente nelle pagine in cui รจ richiesta (parte 90) --- src/App/Database.php | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/src/App/Database.php b/src/App/Database.php index e96b35b..45ca5dc 100644 --- a/src/App/Database.php +++ b/src/App/Database.php @@ -9,7 +9,11 @@ public function __construct(private string $host, private string $name, private string $user, - private string $password) { } + private string $password) { + + echo "Created Database"; + + } public function getConnection(): PDO { $dns = "mysql:host={$this->host};dbname={$this->name};charset=utf8;port=3306"; return new PDO($dns, $this->user, $this->password, [ -- Gitblit v1.8.0