Answer the question
In order to leave comments, you need to log in
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
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. 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 questionAsk a Question
731 491 924 answers to any question