为什么怎么点都是返回首页 [ 新手入门 ]
http://210.51.11.96/blog/index.php
看这个网址,点搜索,应该出机票的列表,可是根本到不了那页,老是回首页。
共 14 条回复
-
<?php // uncomment the following to define a path alias // Yii::setPathOfAlias('local','path/to/local-folder'); // This is the main Web application configuration. Any writable // CWebApplication properties can be configured here. return array( 'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..', 'name'=>'JPS_机票频道', // preloading 'log' component 'preload'=>array('log'), // autoloading model and component classes 'import'=>array( 'application.models.*', 'application.components.*', ), 'defaultController'=>'Index', // application components 'components'=>array( 'user'=>array( // enable cookie-based authentication 'allowAutoLogin'=>true, ), 'smarty'=>array( 'class'=>'application.extensions.CSmarty', ), /*'db'=>array( 'connectionString' => 'sqlite:protected/data/blog.db', 'tablePrefix' => 'tbl_', ),*/ // uncomment the following to use a MySQL database //数据库连接MYSQL 'db'=>array( 'connectionString' => 'mysql:host=localhost;dbname=jps', 'emulatePrepare' => true, 'username' => 'root', 'password' => '123456', 'charset' => 'utf8', 'tablePrefix' => 'tpl_', ), //错误提示页 'errorHandler'=>array( // use 'site/error' action to display errors 'errorAction'=>'index/error', ), //路由跳转 'urlManager'=>array( 'urlFormat'=>'path', 'rules'=>array( 'post/<id:\d+>/<title:.*?>'=>'post/view',//可以删除 'posts/<tag:.*?>'=>'post/index',//可以删除 '<controller:\w+>/<action:\w+>'=>'<controller>/<action>', ), ), 'log'=>array( 'class'=>'CLogRouter', 'routes'=>array( array( 'class'=>'CFileLogRoute', 'levels'=>'error, warning', ), // uncomment the following to show log messages on web pages /* array( 'class'=>'CWebLogRoute', ), */ ), ), ), // application-level parameters that can be accessed // using Yii::app()->params['paramName'] 'params'=>require(dirname(__FILE__).'/params.php'), );
Debug放那呀
-
header("content-Type: text/html; charset=gb2312"); class IndexController extends Controller { public function init(){ $smarty = Yii::app()->smarty; $baseUrl = Yii::app()->request->hostInfo.Yii::app()->baseUrl.'/'; $smarty->assign('baseUrl',$baseUrl); } public function actionIndex(){ $smarty = Yii::app()->smarty; $airport = Airport::model()->findAll(); $smarty->assign('airlines',$airlines); $smarty->display('flight/flight_search.html'); } public function actionList(){ $airport = Airport::model()->findAll(); $smarty->assign('agoDepartureDate',date('Y-m-j',strtotime($_REQUEST['DepartureDate'])-(1*24*3600))); $smarty->assign('backDepartureCity',date('Y-m-j',strtotime($_REQUEST['DepartureDate'])+(1*24*3600))); $smarty->assign('ArrivalCity',$_POST['ArrivalCity']); $smarty->assign('airport',$airport); $smarty->assign('val',intval($_REQUEST['val'])); $smarty->assign('time',intval($_REQUEST['time'])); $smarty->assign('filter',$flight['filter']); $smarty->assign('flight_list',$flight['list']); $smarty->assign('carrier',$flight['carrier']); $smarty->assign('count', count($flight['list'])); }else{ $smarty->assign('No_resault',1); } $smarty->display('flight/flight_list.html'); } }
mab741
注册时间:2012-07-30
最后登录:1970-01-01
在线时长:0小时0分
最后登录:1970-01-01
在线时长:0小时0分
- 粉丝0
- 金钱145
- 威望0
- 积分145