PHP7中文手册2018 带注释 最新chm版
views\site\index.php:
controllers\SiteController.php:
<?php Pjax::begin(); ?> <?= Html::a("Refresh", ['site/index'], ['class' => 'btn btn-lg btn-primary']);?> <h1>Current time: <?= $time ?></h1> <?php Pjax::end(); ?>
controllers\SiteController.php:
public function actionIndex() { return $this->render('index', ['time' => date('H:i:s')]); }
转载请注明:谷谷点程序 » yii2 pajax的简单例子