Skip to content

Commit

Permalink
Improved logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kmaxii committed Jul 12, 2024
1 parent 56edff0 commit c2f81b8
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions Models/Db.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,20 @@ class Db
private PDO $connection;

public function __construct($credentialsFilePath) {
//Print The credentialsFilePath
print_r($credentialsFilePath);

//Print out the entire file path from root of computer
print_r("The real path is: " + realpath($credentialsFilePath));

// Print the credentialsFilePath
print_r($credentialsFilePath);

// Determine the full expected path
$fullExpectedPath = __DIR__ . DIRECTORY_SEPARATOR . $credentialsFilePath;
print_r("Expected full path is: " . $fullExpectedPath);

// Print out the entire file path from root of the computer
$realPath = realpath($credentialsFilePath);
if ($realPath !== false) {
print_r("The real path is: " . $realPath);
} else {
print_r("The real path could not be determined. The file may not exist.");
}

$credentials = parse_ini_file($credentialsFilePath);
$this->host = $credentials['host'];
Expand Down

0 comments on commit c2f81b8

Please sign in to comment.