-
Notifications
You must be signed in to change notification settings - Fork 133
数据库
TIGERB edited this page May 21, 2017
·
1 revision
设置配置.env文件:
[database]
dbtype = mysqldb
dbprefix = easy
dbname = easyphp
dbhost = localhost
username = easyphp
password = easyphp
提供对nosql的支持,提供全局单例对象,借助我们的服务容器我们在框架启动的时候,通过配置文件的配置把需要的nosql实例注入到服务容器中。目前我们支持redis/memcahed/mongodb。
如何使用?如下,
// 获取redis对象
App::$container->getSingle('redis');
// 获取memcahed对象
App::$container->getSingle('memcahed');
// 获取mongodb对象
App::$container->getSingle('mongodb');
A Faster Lightweight Full-Stack PHP Framework Power by TIGERB