sqlitecloud / sqlitecloud-php

PHP drivers for SQLiteCloud
https://sqlitecloud.io
3 stars 0 forks source link

PHP Admin doesn't work in a sub-directory #3

Closed piniyini closed 3 months ago

piniyini commented 3 months ago

I downloaded the admin directory from here

https://github.com/sqlitecloud/sqlitecloud-php/tree/main/admin

It doesn't work when its in a sub-dir, reason being we need to use relative paths in the files such as login.js

https://github.com/sqlitecloud/sqlitecloud-php/blob/main/admin/login.js

Need to change

location.href = '/index.php'; to location.href = './index.php';

and

'/login_action.php' to './login_action.php'

Same applies to other files.

danielebriggi commented 3 months ago

Thank you piniyini for opening the issue. You're right about it, in this branch I fixed the paths: https://github.com/sqlitecloud/sqlitecloud-php/tree/%233-PHP-Admin-do-not-work-in-a-sub-directory Let me know if it works as you expect.