Skip to content

Commit

Permalink
added Hello World demo.
Browse files Browse the repository at this point in the history
  • Loading branch information
qiang.xue committed Oct 2, 2008
1 parent 526d365 commit 570a0ec
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ INSTALLATION
Please make sure the release file is unpacked under a Web-accessible
directory. You shall see the following files and directories:

demos/ containing Yii demos
framework/ containing the Yii framework source files
requirements/ containing the Yii requirement checker
CHANGELOG describing changes in every Yii release
Expand Down
3 changes: 2 additions & 1 deletion build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
<exclude name="**/*.bak"/>
<exclude name="**/*~"/>
<include name="framework/**/*"/>
<include name="requirements/*"/>
<include name="requirements/**/*"/>
<include name="demos/**/*"/>
<include name="COPYRIGHT"/>
<include name="CHANGELOG"/>
<include name="UPGRADE"/>
Expand Down
10 changes: 10 additions & 0 deletions demos/helloworld/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

// remove the following line if running in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);

// include Yii bootstrap file
require_once(dirname(__FILE__).'/../../framework/yii.php');

// create a Web application instance and run
Yii::createWebApplication()->run();
1 change: 1 addition & 0 deletions demos/helloworld/protected/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deny from all
15 changes: 15 additions & 0 deletions demos/helloworld/protected/controllers/SiteController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

/**
* SiteController is the default controller to handle user requests.
*/
class SiteController extends CController
{
/**
* Index action is the default action in a controller.
*/
public function actionIndex()
{
echo 'Hello World';
}
}

0 comments on commit 570a0ec

Please sign in to comment.