<?php
// 加载外部文件
// include 'template/public/header.php'
require 'template/public/header.php';
$news = require 'data/index1.php';
$news1 = require 'data/items1.php';
// print_r($news1);
?>
<!-- 主体 -->
<main>
<!-- 新闻列表 -->
<div class="news">
<h3>新闻列表</h3>
<div class="list">
<a href=""><?=$news['0']?></a>
<a href=""><?=$news['1']?></a>
<a href=""><?=$news['2']?></a>
<a href=""><?=$news['3']?></a>
<a href=""><?=$news['4']?></a>
</div>
</div>
<!-- 产品列表 -->
<div class="items">
<h3>产品列表</h3>
<div class="list">
<?php foreach($news1 as $k => $value){
?>
<div class="item">
<img src="<?=$value['0']?>" alt="" />
<a href=""><?=$value['1']?></a>
</div>
<?php if($k>2){ break;}?>
<!-- <div class="item">
<img src="static/images/item1.jpeg" alt="" />
<a href="">最新产品1</a>
</div>
<div class="item">
<img src="static/images/item2.jpeg" alt="" />
<a href="">最新产品2</a>
</div>
<div class="item">
<a href=""><img src="static/images/item3.jpeg" alt="" /></a>
<a href="">最新产品3</a>
</div>
<div class="item">
<img src="static/images/item4.jpeg" alt="" />
<a href="">最新产品4</a>
</div> -->
<?php } ?>
</div>
</div>
</main>
<?php
// 加载外部文件
include 'template/public/footer.php';
?>