Home > PHP Framework > YII > What should I do if the yii1 verification code does not display?

What should I do if the yii1 verification code does not display?

藏色散人
Release: 2020-07-20 10:04:10
Original
2158 people have browsed it

yii1 The verification code is not displayed because the accessRule blocks the verification code. The solution is to add the action of the verification code and then give it visible permissions to everyone.

What should I do if the yii1 verification code does not display?

Specific question:

I added in the controller:

public function filters(){
    return array(
        'accessControl',
    );
}
public function accessRules(){
    return array(
        array(
            'allow',
            'actions' => array('setmessage','actions'),
            'users'=> array('@')
        ),
        array('deny','users'=> array('*')
        )
    );
}
Copy after login

Access control is good Yes, but the verification code is not displayed?

Recommended: "yii Tutorial"

Solution:

Your accessRule blocks the verification code, you Add the verification code action there, and then give it visible permissions to everyone

The above is the detailed content of What should I do if the yii1 verification code does not display?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template