Giter VIP home page Giter VIP logo

phptoolcode's Introduction

PHP开发人员必须收集的常用工具类代码(更新日志)

常用工具类文件

目录如下

  • 数据库操作→DAOMySQLI.class.php
    • 查询一个字段 fetchOne
    • 查询所有字段 fetchAll
    • 增删改操作 myQuery
  • PDO数据库接口→I_DAO.interface.php
  • PDO数据库类→DAOPDO.class.php
    • 查询所有数据 getAll
    • 查询一条数据 getRow
    • 查询一个字段的值 getOne
    • 增删改操作 exec
    • 查询受影响的记录数resultRows
    • 查询执行插入操作返回的主键的值lastInserId
    • pdo_statement对象 query
    • 转义引号 escapeDate
  • 单例模式→Singleton.class.php
  • 删除给定目录→DeleteDir.class.php
  • 文件上传类→Upload.class.php
  • FTP管理工具→FTP.php
  • 图片处理→Image.class.php
    • 缩略,裁剪,圆角,倾斜
  • 图片处理工具→Image.php
    • 缩略图 thumb
    • 截取图片 crop
  • 图像压缩→ImageThumb.class.php
  • 图片处理(全)→Thumb.class.php
    • 文字水印setMaskWord
    • 图片水印setMaskImg
    • 缩略图边框setDstImgBorder
    • 水平翻转 flipH
    • 垂直翻转flipV
    • 图片剪切 setRectangleCut
  • 二维码→PHPQRcode.class.php
  • 发邮件→Smtp.class.php
  • 日期时间→DateTime.class.php
    • 获取时间戳getUnixTime
    • 获取简短的日期显示getShortDate
  • 运行时间和内存→Runtime.class.php
  • 验证码→Captcha.class.php
  • 验证码→CheckCode.class.php
  • 验证信息(简单)→Verify.class.php
  • 通用验证→Validator.class.php
    • 邮件地址checkEmail
    • 检查字符串checkStr
    • 检查整数checkInt
    • 检查使用HTTP协议的网址checkHttpUrl
    • 电话号码checkTel
    • 检查手机号码 checkMobile
    • 检查邮编 checkZipCode
    • 检查身份证号码checkIdNum
    • 检查日期是否正确checkDate
    • 检查开始日期是否小于结束日期checkDateRange
    • 检查是否为合法金额checkMoney
    • 检查是否为一个合法的日期格式isDate
    • 检查是否为一个合法的时间格式isDatetime
    • 检测一个宽松的日期格式 checkLooseDate
    • 判断是否是浮点数checkFloat
  • 压缩文档→Zip.class.php
  • 字符串处理→String.class.php
    • 过滤非法字符filter
    • 获取UTF-8格式的字符串长度strlenUtf8
    • 获取一个随机字符串randStr
    • 以UTF-8格式截取字符串substrUtf8
    • 移除所有不可见字符trimInvisible
    • 替换字符串 replace
  • URL工具→Url.class.php
    • 进行URL编码encode
    • 进行URL解码decode
  • Json工具→Json.class.php
    • 数据编译为json字符串 encode
    • json字符串解码为数组 decode 常用方法Function.class.php

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.