|
@@ -3,13 +3,12 @@
|
3
|
3
|
|
4
|
4
|
# PHP_CRUD_API
|
5
|
5
|
|
6
|
|
-Single file PHP script that adds a REST API to a MySQL InnoDB database. Alternatively both PostgreSQL 9 and MS SQL Server 2012 are fully supported.
|
|
6
|
+Single file PHP script that adds a REST API to a MySQL InnoDB database. Alternatively both SQLite 3, PostgreSQL 9 and MS SQL Server 2012 are fully supported.
|
7
|
7
|
|
8
|
8
|
## Requirements
|
9
|
9
|
|
10
|
|
- - PHP 5.3 or higher with MySQLi, libpq or SQLSRV enabled
|
|
10
|
+ - PHP 5.3 or higher with MySQLi, libpq, SQLSRV or sqlite3 enabled
|
11
|
11
|
- PHP on Windows when connecting to SQL Server 2012
|
12
|
|
- - PostgreSQL 9 or higher when connecting to PostgreSQL
|
13
|
12
|
|
14
|
13
|
## Installation
|
15
|
14
|
|
|
@@ -86,7 +85,7 @@ $api = new PHP_CRUD_API(array(
|
86
|
85
|
$api->executeCommand();
|
87
|
86
|
```
|
88
|
87
|
|
89
|
|
-NB: The "socket" option is not supported by MS SQL Server.
|
|
88
|
+NB: The "socket" option is not supported by MS SQL Server. SQLite expects the filename in the "database" field.
|
90
|
89
|
|
91
|
90
|
## Documentation
|
92
|
91
|
|
|
@@ -631,6 +630,23 @@ $
|
631
|
630
|
|
632
|
631
|
NB: You MUST use an empty database as a desctructive database fixture ('blog_postgresql.sql') is loaded.
|
633
|
632
|
|
|
633
|
+### SQLite on Linux
|
|
634
|
+
|
|
635
|
+```
|
|
636
|
+$ wget https://phar.phpunit.de/phpunit.phar
|
|
637
|
+$ php phpunit.phar tests/tests.php
|
|
638
|
+PHPUnit 5.1.3 by Sebastian Bergmann and contributors.
|
|
639
|
+
|
|
640
|
+............................................. 45 / 45 (100%)
|
|
641
|
+
|
|
642
|
+Time: 1.84 seconds, Memory: 11.25Mb
|
|
643
|
+
|
|
644
|
+OK (45 tests, 69 assertions)
|
|
645
|
+$
|
|
646
|
+```
|
|
647
|
+
|
|
648
|
+NB: You MUST use an empty database as a desctructive database fixture ('blog_sqlite.sql') is loaded.
|
|
649
|
+
|
634
|
650
|
## Pretty URL
|
635
|
651
|
|
636
|
652
|
You may "rewrite" the URL to remove the "api.php" from the URL.
|