在向此PHP foreach添加一些代碼後,您好!頁面變爲空白,我只能看到屏幕左上角有一個黑色圓點。添加到PHP後頁面變爲空白foreach
我的網站是在Joomla3,我試圖自定義一個模塊。我的網站是http://get2gethersports.com
我有一個最近發佈的模塊,只顯示文章標題。 該代碼下面貼
<?php if ($items) { ?>
<ul class="rsblog-recent-module unstyled<?php echo $params->get('moduleclass_sfx',''); ?>">
<?php foreach ($items as $item) { ?>
<li>
<a <?php echo $opener; ?> href="<?php echo JRoute::_('index.php?option=com_rsblog&view=post&id='.RSBlogHelper::sef($item->id,$item->alias).$Itemid,false); ?>">
<?php echo $item->title; ?>
</a>
</li>
<?php } ?>
</ul>
<?php } ?>
我想abocve像博客飼料上http://vape-co.com
所以我導航到該組件並看到了呼籲圖像添加圖像。這是下面貼:
<div class="rsblog-entry-content">
<?php if ($this->item->image) { ?>
<div class="rsblog-entry-image">
<img class="rsblog-entry-thumb img-polaroid" src="<?php echo JURI::root().'components/com_rsblog/assets/images/blog/'.$this->item->image; ?>?nocache=<?php echo uniqid(''); ?>" alt="<?php echo $this->escape($this->item->title); ?>">
</div>
<?php } ?>
但每當我添加它或它前面的代碼它打破了一個片段....
任何想法,爲什麼它打破了網頁,以及如何解決它? 我嘗試添加新的li標籤。只需添加PHP的一部分上方的一個鏈接等等
代碼更新----
<?php if ($items) { ?>
<ul class="rsblog-recent-module unstyled<?php echo $params->get('moduleclass_sfx',''); ?>">
<?php foreach ($items as $item) { var_dump($item);?>
<li>
<div class="rsblog-entry-content">
<?php if ($this->item->image) { ?>
<div class="rsblog-entry-image">
<img class="rsblog-entry-thumb img-polaroid" src="<?php echo JURI::root().'components/com_rsblog/assets/images/blog/'.$this->item->image; ?>?nocache=<?php echo uniqid(''); ?>" alt="<?php echo $this->escape($this->item->title); ?>">
</div>
</div>
<?php } ?>
<a <?php echo $opener; ?> href="<?php echo JRoute::_('index.php?option=com_rsblog&view=post&id='.RSBlogHelper::sef($item->id,$item->alias).$Itemid,false); ?>">
<?php echo $item->title; ?>
</a>
</li>
<?php } ?>
</ul>
<?php } ?>
'var_dump($ item)' – 2014-11-09 08:07:47
@ trzyeM-我在哪裏放? – 2014-11-09 08:35:00