Git Product home page Git Product logo

xh8039 / jsondb Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 103 KB

A lightweight JSON file database, implemented by native PHP. Jsondb has only one file. If you don't want to use a large database system, or there are multiple small projects in a site, jsondb is your best choice. Jsondb includes querying, adding, updating, deleting and other basic operations on data, and is suitable for storing data with small amount of data

Home Page: http://blog.bri6.cn

License: Apache License 2.0

PHP 100.00%
database json json-database php lightweight-database php7 php8

jsondb's Introduction

JsonDb使用文档

简介

JsonDb是一款由原生PHP实现的非关系型轻量级JSON文件数据库。如果你需要存储各种基础类的数据,或者一个站点内有多个小项目,那么JsonDb就是你最佳的选择。它包括查询、新增、更新、删除等对数据的基本操作,适合存储数据量不大的数据

使用帮助文档QQ交流群:733120686

主要特性

  • 基于JSON和PHP强类型实现
  • 简洁易用的查询功能
  • 支持多数据表及动态切换
  • 支持JSON查询

使用说明

使用 composer

composer require jsondb/jsondb:dev-master

或者

clone 项目到本地

  • github地址
git clone https://github.com/xh8039/JsonDb.git
  • 码云地址
git clone https://gitee.com/yh_IT/json-db.git

初始化

use JsonDb\JsonDb\Db;

// composer自动加载
require 'vendor/autoload.php';

// 默认关闭数据压缩、加密并开启调试模式,可使用自定义配置
// 自定义配置项 具体配置请参考文档:https://gitee.com/yh_IT/json-db/wikis
$json_path = $_SERVER['DOCUMENT_ROOT'] . 'content' . DIRECTORY_SEPARATOR . 'JsonDb';
Db::setConfig([
 'path' => $json_path, // 数据存储路径(必须配置)
 'file_suffix' => '.json', // 文件后缀名
 'debug' => true, // 调试模式
 'encode' => null, // 数据加密函数
 'decode' => null, // 数据解密函数
]);

jsondb's People

Contributors

xh8039 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

lyhiving

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.