PHP code example of dongnan / phpview
1. Go to this page and download the library: Download dongnan/phpview library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dongnan / phpview example snippets
= new \PHPView\View();
//模板变量赋值
$view->assign('name','Dong Nan');
//数组赋值
$view->assign(array('gender'=>'male' 'birthday'=>'1986'));
//输出页面内容
$view->render('view\template.html');
//引入 PHPView 的自动加载文件