mirror of
https://gitee.com/fastadminnet/think-captcha.git
synced 2026-07-06 16:02:48 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1a0260861 | ||
|
|
988d165aae | ||
|
|
6ab79cc547 |
@@ -12,9 +12,8 @@
|
|||||||
namespace think\captcha;
|
namespace think\captcha;
|
||||||
|
|
||||||
use think\Config;
|
use think\Config;
|
||||||
use think\Controller;
|
|
||||||
|
|
||||||
class CaptchaController extends Controller
|
class CaptchaController
|
||||||
{
|
{
|
||||||
public function index($id = "")
|
public function index($id = "")
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
function captcha($id = "", $config = [])
|
function captcha($id = "", $config = [])
|
||||||
{
|
{
|
||||||
$captcha = new \think\Captcha($config);
|
$captcha = new \think\captcha\Captcha($config);
|
||||||
$captcha->entry($id);
|
$captcha->entry($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ function captcha($id = "", $config = [])
|
|||||||
*/
|
*/
|
||||||
function captcha_src($id = "")
|
function captcha_src($id = "")
|
||||||
{
|
{
|
||||||
return \think\Url::build('/captcha' . $id ? "/{$id}" : '');
|
return \think\Url::build('/captcha' . ($id ? "/{$id}" : ''));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user