Spaces:
Sleeping
Sleeping
Download tierapp/test.php from T0KII/tierlists-webapp: direct link, hf CLI and curl.
- Browser
- Download file 776 Bytes
-
https://huggingface.co/spaces/T0KII/tierlists-webapp/resolve/main/tierapp/test.php
- Command line
-
hf download hf://spaces/T0KII/tierlists-webapp/tierapp/test.php
-
curl -L -o test.php https://huggingface.co/spaces/T0KII/tierlists-webapp/resolve/main/tierapp/test.php
776 Bytes
| // Include your database configuration | |
| require_once 'config/Database.php'; | |
| echo "Testing connection to Aiven MySQL database...\n"; | |
| $database = new Database(); | |
| $db = $database->getConnection(); | |
| if ($db) { | |
| echo "Success! The PHP PDO connection is working perfectly.\n"; | |
| // Quick test query to show the tables | |
| try { | |
| $query = "SHOW TABLES"; | |
| $stmt = $db->prepare($query); | |
| $stmt->execute(); | |
| echo "\nTables found in database:\n"; | |
| while ($row = $stmt->fetch(PDO::FETCH_NUM)) { | |
| echo "- " . $row[0] . "\n"; | |
| } | |
| } catch (PDOException $e) { | |
| echo "Query failed: " . $e->getMessage() . "\n"; | |
| } | |
| } else { | |
| echo "Connection failed. Check your credentials or network rules.\n"; | |
| } | |