Skip to content

Commit de75004

Browse files
committed
documentation
1 parent 3eeceb0 commit de75004

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

README.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# PHP-CRUD-ADMIN
22

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.
44

55
## Requirements
66

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
98

109
## Installation
1110

@@ -21,6 +20,21 @@ Test the script by opening the following URL:
2120

2221
Don't forget to modify the configuration at the bottom of the file.
2322

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+
2438
## Compilation
2539

2640
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:
3246
http://localhost:8080/src/
3347

3448
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

Comments
 (0)