You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-3Lines changed: 33 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,10 @@
1
1
# PHP-CRUD-ADMIN
2
2
3
-
Single file PHP script that adds an database admin interface to a [PHP-CRUD-API](https://github.com/mevdschee/php-crud-api) project
3
+
A database admin interface for MySQL, PostgreSQL or SQL Server in a single file PHP script.
4
4
5
5
## Requirements
6
6
7
-
- PHP 7.0 or higher with Curl enabled
8
-
- An URL of PHP-CRUD-API v2
7
+
- PHP 7.0 or higher with PDO drivers for MySQL, PgSQL or SqlSrv enabled
9
8
10
9
## Installation
11
10
@@ -21,6 +20,21 @@ Test the script by opening the following URL:
21
20
22
21
Don't forget to modify the configuration at the bottom of the file.
23
22
23
+
## Configuration
24
+
25
+
Use the 'api' config parameter to configure the embedded [PHP-CRUD-API](https://github.com/mevdschee/php-crud-api).
26
+
27
+
These are the most importatnt configuration options and their default value between brackets:
28
+
29
+
"driver": mysql, pgsql or sqlsrv (mysql)
30
+
"address": Hostname of the database server (localhost)
31
+
"port": TCP port of the database server (defaults to driver default)
32
+
"username": Username of the user connecting to the database (no default)
33
+
"password": Password of the user connecting to the database (no default)
34
+
"database": Database the connecting is made to (no default)
35
+
36
+
For more information check out the [PHP-CRUD-API](https://github.com/mevdschee/php-crud-api) documentation.
37
+
24
38
## Compilation
25
39
26
40
You can compile all files into a single "`admin.php`" file using:
@@ -32,3 +46,19 @@ You can access the non-compiled code at the URL:
32
46
http://localhost:8080/src/
33
47
34
48
The non-compiled code resides in the "`src`" and "`vendor`" directories. The "`vendor`" directory contains the dependencies.
49
+
50
+
## Updating dependencies
51
+
52
+
You can update all dependencies of this project using the following command:
53
+
54
+
php update.php
55
+
56
+
This script will install and run Composer to update the dependencies.
57
+
58
+
NB: The update script will also patch the dependencies in the vendor directory for PHP 7.0 compatibility.
59
+
60
+
## Local or remote API
61
+
62
+
This script is powered by [PHP-CRUD-API](https://github.com/mevdschee/php-crud-api) and embeds this project. Alternatively, it can run against a remote (live) installation.
63
+
64
+
If you want to run this against a remote installation, then replace the 'api' config parameter with one called 'url' that holds the base URL of your PHP-CRUD-API installation.
0 commit comments