Is it possible to access a sqlite database file in a remote server with PHP? I have enabled read access on the databse.db
file and tried this:
$dbconn = new SQLite3("http://www.foo.com/database.db");
but it doesn't work:
Fatal error: Uncaught exception 'Exception' with message 'Unable to open database: unable to open database file
SQLITE is not for this operation, but we can do a trick :) .
NOTE: this is just for fun as by this trick we created server/client api to simulate server/client db using your programming lang and sqlite :)
I think you can't connect like this. You can't open the sqlite database which is hosted on remote server, because you may need the update permission of that file.
So you can download that file in your server parametrically then can connect that file which you downloaded.
Thanks
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.