yii2 captcha not change on page refresh
问题 I am using the default captcha implementation of the yii2 advanced framework. I have a problem: I want to change my captcha code every time I refresh a page but when I refresh the page my captcha code does not change. 回答1: The most correct solution will be to create your own CaptchaAction , that extends yii\captcha\CaptchaAction and override the run() method as follows: namespace app\actions; // Change to your own class CaptchaAction extends yii\captcha\CaptchaAction { public $autoRegenerate