blob: 9b25d7a4873e2c805e865392ac68417e58871667 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
<?php
$auth = [ "username" => "password" ];
header("Content-Security-Policy: script-src 'none'"); // disable js
$db = new PDO("sqlite:db", null, null, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
if (!$db)
die("db: " . htmlspecialchars($e->getMessage()));
$ro = new PDO("sqlite:db", null, null, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::SQLITE_ATTR_OPEN_FLAGS => PDO::SQLITE_OPEN_READONLY]);
if (!$ro)
die("ro: " . htmlspecialchars($e->getMessage()));
|