Commit e5be6868 by Alexander Makarov

create command template cleanup

parent a25f8700
<?php
define('YII_DEBUG', true);
$yii = __DIR__.'/../framework/yii.php';
require $yii;
$config = require dirname(__DIR__).'/protected/config/main.php';
$basePath = dirname(__DIR__).'/protected';
$app = new \yii\web\Application('webapp', $basePath, $config);
$app->run();
\ No newline at end of file
<?php
return array(
'name' => 'My Web Application',
'components' => array(
// uncomment the following to use a MySQL database
/*
'db' => array(
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=testdrive',
'username' => 'root',
'password' => '',
),
*/
),
);
\ No newline at end of file
<?php
use \yii\web\Controller;
/**
* SiteController
*/
class SiteController extends Controller
{
public function actionIndex()
{
echo $this->render('index', array(
'name' => 'Qiang',
));
}
}
\ No newline at end of file
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title><?php echo $this->context->pageTitle?></title>
</head>
<body>
<h1><?php echo $this->context->pageTitle?></h1>
<div class="content">
<?php echo $content?>
</div>
<div class="footer">
<?php echo \Yii::powered()?>
</div>
</body>
</html>
\ No newline at end of file
Hello, <?php echo $name?>!
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment