2014-07-04 19 views
0

上我使用Yii的用戶模塊和我在縱斷面圖中的另一個控制器的動作的RenderPartial視圖的Yii的RenderPartial上的LocalServer工作(XAMPP),但不正常的主機

<div class="row"> 
<?php $model2 = new Symptomhistory; ?> 
<?php $this->renderPartial('//symptomhistory\_usersHistory',array('model'=>$model2)); ?> 
</div> 

此代碼工作完全當我運行它在我的本地服務器上,但是當我把它上傳到我的主人,我得到以下錯誤:

CException 

ProfileController cannot find the requested view "//symptomhistory\usersHistory". 

我試着去與」路徑.... \等..等.. \意見\ symptomhistory \ usersHistory「,但它不起作用。這是我的服務器的問題嗎?因爲如果它是一個奇怪的因爲所有其他renderPartials工作正常,它只是這個它找不到。

謝謝你的時間。

回答

1

你可能在windows上運行xampp吧?不要使用反斜槓作爲路徑分隔符,總是使用正斜槓。

所以,你的命令應該是:

<?php $this->renderPartial('//symptomhistory/_usersHistory', array('model' => $model2)); ?> 
+0

燁是固定它,謝謝:) –

相關問題