This commit is contained in:
2022-12-24 22:10:40 +08:00
parent 84fc1030a7
commit 2a00928da5
4898 changed files with 429855 additions and 77 deletions
+18
View File
@@ -0,0 +1,18 @@
<?php
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/support/bootstrap.php';
/**
use GeoIp2\Database\Reader;
$reader = new Reader(base_path().'/geoip/GeoLite2-City/GeoLite2-City.mmdb');
$record = $reader->city('38.240.134.22');
print_r($record);
**/
use support\Redis;
$redis = Redis::connection('default');
$redis->hset('User','1',json_encode(['account' => 'admin', 'email' => 'admin@admin.com', 'passwd' => hash("sha256", 'admin123456'), 'name' => '管理员']));
print_r($redis->hgetall('User'));
?>