我有一个这样的 php 代码,它主要从站点获取 rss 提要
<?php
$xmlstr = file_get_contents("http://news.myweb.com.au/index.php?format=feed&type=rss");
$xml_object = new SimpleXMLElement($xmlstr);
$items = $xml_object->channel->item;
?>
<?php foreach($items as $item):?>
<h1> <?php echo $item->title;?> </h1>
<p >
<?php echo substr($item->description, 0, 250);?>...
<a href="<?php echo $item->link;?>">Read More</a>
</p>
<?php endforeach; ?>
now I am including that file in some other file like this
<div class="leftColumnH">
<?php include('blog.php');?>
</div>
<div class="rightColumnH">
<h2 class="fontstyle leftColumnText ">Web Development & Graphic Design</h2>
some test here
</div>
但是,当我在浏览器中看到它时,“rightcolumn”进入了一个 div,其中的类“feed-description”在 leftColunm 中。