[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了。
發布文章不存在?
發布文章的時候,右側選擇發布后才能顯示文章,剛接觸新版本的,沒太注意。