amattu2/php-filter 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

amattu2/php-filter

最新稳定版本:v1.0.0

Composer 安装命令:

composer require amattu2/php-filter

包简介

A basic PHP input filter and validation class.

README 文档

README

This is a PHP class which implements static methods to filter/format unsanitized user input. See below for usage examples and cases. Alternatively, take a look at the index.php file for further examples.

Usage

Include the /src/Filter.php file

require(dirname(__FILE__) . "/src/Filter.php");

Methods

Filter::*input*(string $var)

Remove unprintable characters, HTML entities, and slashes.

Filter::*nonNumeric*(int|string|double|float $var)

Remove non-numeric characters

Filter::*nonAlpha*(mixed $var)

Remove non-alpha (a-zA-Z) characters

Filter::*nonAlphaNumeric*(mixed $var)

Remove non-alphanumeric (a-zA-Z0-9) characters

Filter::*fileName*(string $var)

Replace whitespace characters with a dash (-)

Filter::*number*(int|string $var)

Format a 10 digit phone number (XXX-XXX-XXXX)

Notes

You should always use prepared statements and proper validation on all unsafe input, regardless of using this class or not.

统计信息

  • 总下载量: 17
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: AGPL-3.0
  • 更新时间: 2023-03-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固