public function imgVerityAction() { $verity = new Verify(); $verity->entry(1); }
<?php include_once "./Verify.class.php"; $fontSize = isset($_GET['fontSize']) && $_GET['fontSize'] != 'undefined' ? $_GET['fontSize'] : 36; $length = isset($_GET['length']) && $_GET['length'] != 'undefined' ? $_GET['length'] : 4; $useNoise = isset($_GET['useNoise']) && $_GET['useNoise'] != 'undefined' ? $_GET['useNoise'] : 1; $useCurve = isset($_GET['useCurve']) && $_GET['useCurve'] != 'undefined' ? $_GET['useCurve'] : 0; $config = array('fontSize' => $fontSize, 'length' => $length, 'useNoise' => $useNoise, 'useCurve' => $useCurve); if (!isset($_SESSION)) { session_start(); } $Verify = new Verify($config); $id = $Verify->entry(); echo $id;
public function verify() { import('ORG.Verify'); Verify::entry(); }
<?php // +---------------------------------------------------------------------- // | Demila [ Beautiful Digital Content Trading System ] // +---------------------------------------------------------------------- // | Copyright (c) 2015 http://demila.org All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- // | Email author@demila.org // +---------------------------------------------------------------------- //生成验证码 require_once ROOT_PATH . '/classes/Verify.class.php'; $verify = new Verify(); $verify->entry(1);
/** * 验证码 */ public function vertify() { $config = array('fontSize' => 20, 'length' => 4, 'useCurve' => true, 'useNoise' => true); $Verify = new Verify($config); $Verify->entry("AdminLogin"); }