验证码在不同模块中显示问题

浏览:417 发布日期:2017/10/19 分类:ThinkPHP5专区 关键字: TP5验证码问题
先上代码:<img src="{:captcha_src()}" border="0" id="verify"  />这是我验证码调用的链接
前台入口文件:define('APP_PATH', __DIR__ . '/application/');
// 加载框架基础文件
require __DIR__ . '/thinkphp/base.php';
// 绑定当前入口文件到admin模块
\think\Route::bind('home');
// 关闭admin模块的路由
\think\App::route(true);
// 执行应用
\think\App::run()->send();
后台入口文件:// 定义项目路径
define('APP_PATH', __DIR__ . '/application/');
// 加载框架基础文件
require __DIR__ . '/thinkphp/base.php';
// 绑定当前入口文件到admin模块
\think\Route::bind('admin');
// 关闭admin模块的路由
\think\App::route(false);
// 执行应用
\think\App::run()->send();
结果是:http://abc.com/index.php/captcha.html 能生成验证码,但是
http://abc.com/admin.php/captcha.html ,不能生成验证码,求解
最佳答案
评论( 相关
后面还有条评论,点击查看>>