S
S
Stepan2015-06-15 01:42:00
Yii
Stepan, 2015-06-15 01:42:00

In Yii2, one page has a normal encoding, but not the other, why?

There is a main page, and another one, on the main Index everything is in order. When I switch to another one, the encoding flies
163a0757a4524001b3f817fa091b5304.png
Apparently because of this code

$model = new ContactForm();

        if ($model->load(Yii::$app->request->post()) && $model->contact(Yii::$app->params['adminEmail'])) {
            return $this->refresh();
        } else {
            return $this->render('contact', [
                'model' => $model,
            ]);
        }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Khomenko, 2015-06-15
@xoma2

1. Using any tool to determine in which encoding the pages are displayed clip2net.com/s/3jhA90h
2. Make sure that all scripts (display) are saved in UTF-8 (without BOM) clip2net.com/s/3jhAndZ
3. Make sure that the charset is written in the layout clip2net.com/s/3jhAE3K I
suspect that you have a jamb in paragraph 2, but check everything at once

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question