PHP code example of fenghuilee / yii2-smartyviewer
1. Go to this page and download the library: Download fenghuilee/yii2-smartyviewer 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/ */
fenghuilee / yii2-smartyviewer example snippets
xxx/config/main.php
return [
//....
'components' => [
'smarty' => [
'class' => 'yii\smartyviewer\SmartyViewer',
//'themeName' => 'basic',
//'cachePath' => '@runtime/Smarty/cache',
//'options' => [
// 'left_delimiter' => '<{',
// 'right_delimiter' => '}>',
//],
],
],
];
XxxxController.php
public function init()
{
Yii::$app->smarty->init();
parent::init();
//other code
}
php composer.phar