PHPackages                             cocolait/cp\_helper - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. cocolait/cp\_helper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

cocolait/cp\_helper
===================

A common extension library

2.3(7y ago)1322Apache-2.0PHPPHP &gt;=5.5.0

Since Sep 28Pushed 7y ago1 watchersCompare

[ Source](https://github.com/cocolait/cp_helper)[ Packagist](https://packagist.org/packages/cocolait/cp_helper)[ RSS](/packages/cocolait-cp-helper/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (2)Dependencies (4)Versions (12)Used By (0)

cp\_helper
==========

[](#cp_helper)

composer PHP处理类 （数据处理、下载、ip处理、字符串处理,分页,编码处理,日期处理,excel表格,发送email,二维码处理）

链接
--

[](#链接)

- 博客：
- github：
- gitee：

安装
==

[](#安装)

```
composer require cocolait/cp_helper
```

版本要求
====

[](#版本要求)

> PHP &gt;= 5.5

使用案例
====

[](#使用案例)

```
//发送邮件
$mail_option = [
      'send_name' => 'Cocolait博客',//发送人的名称
      'host' => 'smtp.mxhichina.com',//设置SMTP服务器
      'username' => 'xxxx',//邮件
      'password' => 'xxxx'
];
$content = "这是一个很美好的开始,确实很精彩";
$data = \cocolait\helper\CpEmail::send('enkipen@qq.com','优美的文章',$content,$mail_option);
```

```
// excel表格处理
// 导入Excel文件
$data = \cocolait\helper\CpExcel::importExcel();
// 导出Excel文件
$data = \cocolait\helper\CpExcel::exportExcel('文件名称','设置Excel表格第一行的显示','需要导出的所有数据');
// Excel转换Array
$data = \cocolait\helper\CpExcel::excelFileToArray('Excel文件全路径','文件后缀 默认是 xls');
```

```
// 创建普通二维码
\cocolait\helper\CpQrCode::create('http://www.mgchen.com');
// 创建带有标题且有LOGO的二维码
\cocolait\helper\CpQrCode::create('http://www.mgchen.com',$size = 240, $title = 'cocolait', $logo = './logo.png');
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity65

Established project with proven stability

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 ~39 days

Recently: every ~63 days

Total

11

Last Release

2808d ago

Major Versions

1.2 → 2.02017-12-04

PHP version history (2 changes)1.1PHP &gt;=5.4.0

2.0PHP &gt;=5.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/28f3e5e79b4d0be726b4619a322b723b22dfd0dbfd6f2522dc3c3b2675f63a62?d=identicon)[cocolait](/maintainers/cocolait)

### Embed Badge

![Health badge](/badges/cocolait-cp-helper/health.svg)

```
[![Health](https://phpackages.com/badges/cocolait-cp-helper/health.svg)](https://phpackages.com/packages/cocolait-cp-helper)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)

PHPackages © 2026

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