skywind
skywind

Reputation: 964

How to open sqlite3 database using PDO not in same directory?

How i can open a database using this line:

$db = new PDO('sqlite:mydb.sqlite');

if my db not in this directory?

Upvotes: 4

Views: 2627

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798606

Use the same scheme, but put the full path.

sqlite:/path/to/db.sqlite

Upvotes: 10

Related Questions