-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex3.php
More file actions
31 lines (23 loc) · 792 Bytes
/
index3.php
File metadata and controls
31 lines (23 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
// curl https://loadfunc.github.io/php/apifunc.php --output apifunc.php
include 'apifunc.php';
# Load functions from remote/local
apifunc([
'https://php.letjson.com/let_json.php',
'https://php.defjson.com/def_json.php',
'https://php.apisql.com/api_sql.php'
], function ($func_url_array) {
// Load config file from remote/local json file
let_json('db.json', function ($db) {
var_dump($db);
// load data from sqlite based on json configuration: db.json
api_sql($db->db, $db->read, function ($fetch) {
// WRITE data from sqlite
def_json('data.json', $fetch, function () {
// READ saved DATA from sqlite
var_dump( let_json('data.json') );
});
});
});
});
?>