The sqlite PHP PDO code below works when i run it through PHP command line from the htdocs directory in XAMPP. However, when I run it as localhost, it cannot find S2.db. There are the correct permissions on that directory...
What is the right way to access a different directory with ATTACH DATABASE when run through XAMPP? Thank you!
$db = new PDO('sqlite:S1.db');
$db->exec("ATTACH DATABASE '../S2.db' as table1");