PHPackages                             mdzz/my-function - 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. mdzz/my-function

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

mdzz/my-function
================

extensions for self consumption

v1.0.5(2y ago)28proprietaryPHPPHP &gt;=5.6

Since Feb 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mdzz-debug/MyFunction)[ Packagist](https://packagist.org/packages/mdzz/my-function)[ RSS](/packages/mdzz-my-function/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

MyFunction(MF)
==============

[](#myfunctionmf)

### 简介

[](#简介)

PHP常用函数封装

### 技术支持

[](#技术支持)

1. Qrcode

### Composer安装

[](#composer安装)

[packagist 访问](https://packagist.org/packages/mdzz/my-function)

```
composer require mdzz/my-function
```

### 使用文档

[](#使用文档)

1. 文件处理类
    - saveFile 保存文件 ```
        // $file $_FILE，必填
        // $path 保存路径，必填
        // $filename 文件名命名规则，可选，默认为原文件名
        // $suffix 文件后缀，可选，默认为原文件后缀
        File::saveFile($file, $path, $filename, $suffix);
        ```
    - getFileSize 获取文件大小 ```
        // $file 必填, 可以是本地文件也可以是远程文件
        // $unit 单位，可选，默认为KB
        // $compare 比较值，可选，默认为false不比较
        // 比较模式，$compare填 eg: '
