2017-03-03 39 views
0

生產中找不到錯誤,我認爲這可能是因爲類尚未導入,或者找不到文件。生產中找不到類'yii helpers HTMLPurifier'

,但我已經與

use Yii; 
use common\models\TbPesan; 
use common\models\TbPesanSearch; 
use common\models\TbPesanDest; 
use yii\web\Controller; 
use yii\web\NotFoundHttpException; 
use yii\filters\VerbFilter; 
use yii\helpers\Url; 
use common\component\BeoHelper; 
use yii\helpers\HTMLPurifier; 

BaseHtmlPurifier.phpHtmlPurifier.php匯入類是存在於vendor/yiisoft/yii2/helpers

這裏是我的代碼使用​​3210

$model2->isi_pesan = HTMLPurifier::process($model->jawaban."<br />------------ Reply --------------<br />".$model->isi_pesan); 

,但我可以運行動作在我的本地環境中,控制器代碼是相同的。

那麼,怎麼了?

如果您需要更多信息,請讓我知道。

回答

0

use yii\helpers\HtmlPurifier;代替

+1

如果這個答案擴大了,爲什麼這是修復,這個答案會更好。 – chwarr

+0

@chwarr也許你也可以發佈答案。 –

0

你說你的本地環境沒有問題,但部署到線上(脾淋巴細胞)環境中無法正常工作。請檢查產品環境是否存在BaseHtmlPurifier.php和HtmlPurifier.php