mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-16 14:29:30 +08:00
reorganized app code.
removed app template from framework folder.
This commit is contained in:
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -1,17 +0,0 @@
|
|||||||
<?php
|
|
||||||
/** @var $controller \yii\console\controllers\AppController */
|
|
||||||
$controller = $this;
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'default' => array(
|
|
||||||
'index.php' => array(
|
|
||||||
'handler' => function($source) use ($controller) {
|
|
||||||
return $controller->replaceRelativePath($source, realpath(YII_PATH.'/yii.php'), 'yii');
|
|
||||||
},
|
|
||||||
'permissions' => 0777,
|
|
||||||
),
|
|
||||||
'protected/runtime' => array(
|
|
||||||
'permissions' => 0755,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<?php
|
|
||||||
define('YII_DEBUG', true);
|
|
||||||
|
|
||||||
require __DIR__.'/../framework/yii.php';
|
|
||||||
|
|
||||||
$config = require dirname(__DIR__).'/protected/config/main.php';
|
|
||||||
$config['basePath'] = dirname(__DIR__).'/protected';
|
|
||||||
|
|
||||||
$app = new \yii\web\Application($config);
|
|
||||||
$app->run();
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
<?php
|
|
||||||
return array(
|
|
||||||
'id' => 'webapp',
|
|
||||||
'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' => '',
|
|
||||||
),
|
|
||||||
*/
|
|
||||||
'cache' => array(
|
|
||||||
'class' => 'yii\caching\DummyCache',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<?php
|
|
||||||
use \yii\web\Controller;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* SiteController
|
|
||||||
*/
|
|
||||||
class SiteController extends Controller
|
|
||||||
{
|
|
||||||
public function actionIndex()
|
|
||||||
{
|
|
||||||
echo $this->render('index', array(
|
|
||||||
'name' => 'Qiang',
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
<?php use yii\helpers\Html as Html; ?>
|
|
||||||
<!doctype html>
|
|
||||||
<html lang="<?php \Yii::$app->language?>">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<title><?php echo Html::encode($this->title)?></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1><?php echo Html::encode($this->title)?></h1>
|
|
||||||
<div class="content">
|
|
||||||
<?php echo $content?>
|
|
||||||
</div>
|
|
||||||
<div class="footer">
|
|
||||||
<?php echo \Yii::powered()?>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
Hello, <?php echo $name?>!
|
|
||||||
@@ -13,7 +13,8 @@ without prior notices. **Yii 2.0 is not ready for production use yet.**
|
|||||||
DIRECTORY STRUCTURE
|
DIRECTORY STRUCTURE
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
app/ a ready-to-use application built on Yii 2
|
apps/ ready-to-use Web apps built on Yii 2
|
||||||
|
bootstrap/ a simple app supporting user login and contact page
|
||||||
build/ internally used build tools
|
build/ internally used build tools
|
||||||
docs/ documentation
|
docs/ documentation
|
||||||
framework/ framework source files
|
framework/ framework source files
|
||||||
|
|||||||
Reference in New Issue
Block a user