Download the PHP package linjialiang/tp6-captcha without Composer

On this page you can find all versions of the php package linjialiang/tp6-captcha. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tp6-captcha

tp6-captcha

thinkphp6 验证码类库

安装

composer require linjialiang/tp6-captcha

使用

启用 Session

ThinkPHP 6.0 下 Session 功能默认是没有开启的(API 通常不需要),如需开启可在 全局中间件定义文件 中加上下面的定义:

在控制器中输出验证码

在控制器的操作方法中使用

然后注册对应的路由来输出验证码

模板里输出验证码

首先要在你应用的路由定义文件中,注册一个验证码路由规则。

然后就可以在模板文件中使用

或者

上面两种的最终效果是一样的

控制器里验证

使用 TP 的内置验证功能即可

或者手动验证

字符说明

默认字体,支持的字符有限,如需增加其它字符请重新载入字体:

目录 描述
assets/fonts@default 常规字符集
assets/fonts@zh 中文字符集
assets/fonts@math 算术字符集
assets/fonts@source FontForge 字体文件
assets/bgs 验证码背景图

支持的字体类型

支持 3 种类型的字体: ttfttcotc

字符集内容:

  1. 中文字符集

  2. 常规字符集

  3. math 字符集

参考来源

tp6-captcha 灵感来自 thinkphp 官方验证码类库,操作上与其基本一致!


All versions of tp6-captcha with dependencies

PHP Build Version
Package Version
Requires topthink/framework Version ^6.0.1
ext-imagick Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package linjialiang/tp6-captcha contains the following files

Loading the files please wait ....