企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[TOC] # 1.0 thinkphp5.0.9版本之前 > 扩展类验证码背景图片开启错误解决 验证码的配置参数统一在应用配置文件(application/config.php)中添加captcha配置参数,例如: ~~~ // +---------------------------------------------------------------------- // | 验证码 // +---------------------------------------------------------------------- 'captcha' => [ // 字体大小 'fontSize' => 25, // 验证码长度(位数) 'length' => 4, // 使用背景图片 'useImgBg' => true, ], ~~~ 打开文件 vendor\topthink\think-captcha\src\Captcha.php找到 $path = dirname(__FILE__) . '/verify/bgs/'; 改为 $path = dirname(__FILE__) . '/../assets/bgs/'; # 1.1 thinkphp5.0.9 php5.5版本以上提示”No input file specified“问题解决 .htaccess文件中的 `RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]` 在默认情况下会导致No input file specified. 修改成 `RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]` 问题解决。 # 1.2 thinkphp5.0.10版本至5.09升级后出现admin/login/index.html.html `return $this->redirect(Url::build('admin/login/index'));` 错误写法# 则会跳转到admin/login/index.html.html多追加了一个.html `return $this->redirect('admin/login/index');` 正确写法# 生成则是:admin/login/index.html,正常 # 1.3 thinkcmf5.0.181212新安装把public设置成网站根目录,后台点击提示模块不存在:public 把public目录设置成网站根目录后,记得清一下缓存,缓存目录还是public所以会提示找不到,清完就变成admin了。 发布文章不存在? 发布文章的时候,右侧选择发布后才能显示文章,刚接触新版本的,没太注意。