<?php require 'model/thuvien.php'; require 'libs/Smarty.class.php'; $smarty = new Smarty(); $tv = new Thuvien(); $tv->linkrss = 'http://vnexpress.net/rss/oto-xe-may.rss'; $danhsach = $tv->readrss(); //Gọi phương thức lấy danh sách dữ liệu từ RSS $smarty->assign('list', $danhsach); //Khai báo hiển thị tầng view $smarty->display('home.html'); //gọi hiển thị tầng view