[英]PHP site running fine on localhost but not working on a live server
[英]Cake PHP site working fine on localhost but error when on server
情況就是這樣。 我已經正常烘烤了蛋糕php應用程序。 該站點在本地服務器上運行良好。 但是,當遷移到bluehost服務器時,它開始在hasmany中出現問題並屬於關聯。 我發現的問題基本上是在包含數據的數組中。 例如,$ comments通常具有數據
Array([Comment] => Array([id] => 46 [name] => asddasd [email] => sdaa [website] => asdasd [commentdata] => asdasd [postdate] => 2012-04-27 08 :20:00 [post_id] => 2)[Post] =>數組([id] => 2 [title] =>戰機[類別] =>軍事[描述] => asddasdasdasdasdasd [body] =>您好,是第二個[創建] => 2012-04-10 18:41:43 [修改] => 2012-04-27 13:25:33 [user_id] => 0))
但是在網絡服務器上
Array([Comment] => Array([id] => 8 [name] => ddasdasdsdasd [email] => asdasd [網站] => asdasd [commentdata] => adasdasdasdad [postdate] => 2012-04-23 23 :15:00 [post_id] => 8))
因此最終顯示以下錯誤
未定義的索引:發布[APP / View / Comments / index.ctp,第24行]第24行是
<?php echo $this->Html->link($comment['Post']['title'], array('controller' => 'posts', 'action' => 'view', $comment['Post']['id']));
請為此解決嗎?
看看本教程: http : //ad7six.com/2007/08/24/Production-setup-revisited.html 。 我已經看到這個問題在此站點上發布了很多,即:此處: 在Bluehost上安裝Cakephp和此處: 在bluehost上設置cakephp 2.0
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.