PHPackages                             xiaocheng-keji/think-dm - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. xiaocheng-keji/think-dm

ActiveLibrary[Database &amp; ORM](/categories/database)

xiaocheng-keji/think-dm
=======================

thinkphp5.1 达梦8数据库驱动

2.x-dev(2y ago)019Apache-2.0PHP

Since Apr 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/xiaocheng-keji/think-dm)[ Packagist](https://packagist.org/packages/xiaocheng-keji/think-dm)[ RSS](/packages/xiaocheng-keji-think-dm/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

ThinkPHP 5.1 达梦8数据库驱动
=====================

[](#thinkphp-51-达梦8数据库驱动)

---

[ThinkPHP 5.0 版](https://gitee.com/xiaocheng_keji/think-dm/tree/1.x) 对应 1.x 分支
[ThinkPHP 5.1 版](https://gitee.com/xiaocheng_keji/think-dm/tree/2.x) 对应 2.x 分支
[ThinkPHP 6.0 版](https://gitee.com/xiaocheng_keji/think-dm/tree/3.x) 对应 3.x 分支
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#thinkphp-50-版-对应-1x-分支thinkphp-51-版-对应-2x-分支thinkphp-60-版-对应-3x-分支)

原来为 [71CMS创先云党建](https://gitee.com/xiaocheng_keji/71cms) 从 MySQL 移植到 DM 写的，现在开源出来，供大家学习交流。

此驱动基于 PDO 的达梦数据库扩展，需要先安装达梦数据库的 PDO 扩展，命令行中执行 php –m 需要 有 PDO 和 PDO\_DM

当时的达梦 dm\_svc.conf 配置：

```
TIME_ZONE=(480)
LANGUAGE=(cn)
CHAR_CODE=(PG_UTF8)
KEYWORDS=(user,label)

```

dm.ini 配置：

```
COMPATIBLE_MODE=4

```

安装扩展包

```
composer require xiaocheng-keji/think-dm:2.x-dev

```

然后，配置应用的数据库配置：

```
TYPE = dm
HOSTNAME = localhost
USERNAME = SYSDBA
PASSWORD = SYSDBA
HOSTPORT = 5236
CHARSET = utf8
PREFIX = xc_
DEBUG = true

```

即可正常使用达梦数据库，例如：

```
Db::name('demo')
    ->find();
Db::name('demo')
    ->field('id,name')
    ->limit(10)
    ->order('id','desc')
    ->select();

```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

766d ago

Major Versions

1.x-dev → 2.x-dev2024-04-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/bc464c4c363286db79dbb07eaab10fb39fe0c623b3cb3114ac2e3d258eb89cf3?d=identicon)[nnly055](/maintainers/nnly055)

---

Top Contributors

[![nnly055](https://avatars.githubusercontent.com/u/9215795?v=4)](https://github.com/nnly055 "nnly055 (2 commits)")

### Embed Badge

![Health badge](/badges/xiaocheng-keji-think-dm/health.svg)

```
[![Health](https://phpackages.com/badges/xiaocheng-keji-think-dm/health.svg)](https://phpackages.com/packages/xiaocheng-keji-think-dm)
```

###  Alternatives

[topthink/think-migration

96460.8k121](/packages/topthink-think-migration)[topthink/think-mongo

mongodb driver for thinkphp6.0

109139.8k6](/packages/topthink-think-mongo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
