ThinkPHP5-- mounted using codes given composer

Use tp5 installation verification code always error, Baidu for a long time and finally found a way, this blog is a reprint of his, hoping to help you.

  To install the first composer, most of the " " command prompt does not work or is not an internal command or executable files, because they did not install the composer, or installation is unsuccessfulcomposer require topthink/think-captcha . Composer can direct Baidu search, there is a link, Baidu also has tutorials experience, not here described in detail.

After the installation is successful composer in your home directory project address bar type cmd, and then enter to download and install captcha, of course, at this time there is a great probability will complain, for about two problems I encountered it:composer require topthink/think-captcha

First: network problems, type " " window has been no response, then you need to use the following command to modify composer profiles, the use of domestic mirroring. The reason you know.composer require topthink/think-captcha

composer config -g repo.packagist composer https://packagist.phpcomposer.com

Second: the version of the problem: At this point there is a high probability will lead not match the version of error, error codes are as follows:

Because the official 5.0version of the version number are extensions 1.*, 2.0version ThinkPHP are 5.1version-specific, we only need to replace the version you can:

composer require topthink/think-captcha 1.*

 Note: To install this code installed in the root directory of the project

 

 

 Original link: https://www.cnblogs.com/xwenbin/p/10490651.html

Guess you like

Origin www.cnblogs.com/bushui/p/11904684.html