0

My application works perfectly locally however upon uploading to live server there's a couple of issues.

The first one is I get the following error on one specific page of my application but not on other that user the same class.

Class 'yii\helpers\url' not found

The above error is found even though I have the below line at the top of my view file.

use yii\helpers\url;

The other issue I get is when trying to locate a record within my Seo table using my Seo model however this error again only occurs on one part of my application but not the other part that uses the same table/model. Below is the error I get:

Class 'common\models\seo' not found

When I use the following line (I can confirm table relations work and the necessary data is their)

$seo = Seo::find()->where(['id' => $model->seo_id])->one();
4

1 回答 1

2

使用 yii\helpers\url;

改成

使用 yii\helpers\Url;

同样的方式 seo 类名将使用大写开始

搜索引擎优化

于 2016-08-07T20:19:08.343 回答