ThinkPHP5.1安裝圖形驗證碼的時候報錯:
Problem 1
- Installation request for topthink/think-captcha ^3.0 -> satisfiable by topthink/think-captcha[v3.0.0].
- topthink/think-captcha v3.0.0 requires topthink/framework ^6.0.0 -> satisfiable by topthink/framework[6.0.x-dev, v6.0.0-rc2] but these conflict with your requirements or minimum-stability.
出錯原因:
當我們使用命令 composer require topthink/think-captcha
下載驗證碼庫時,默認下載最新版本,當前最新版本是3.0,3.0版本是為ThinkPHP6准備的,所以我們需要下載2.0版本驗證碼庫,2.0版本的才是為ThinkPHP5.1准備的,所以當我們使用composer命令下載驗證碼庫的時候指定版本號即可
composer require topthink/think-captcha=2.*