Authored by whb

去掉Bom

1 -<?php  
2 - 1 +<?php
3 /** 2 /**
4 * 启动运行 3 * 启动运行
5 * 4 *
@@ -71,14 +70,16 @@ class Bootstrap extends Bootstrap_Abstract @@ -71,14 +70,16 @@ class Bootstrap extends Bootstrap_Abstract
71 $module = 'Index'; 70 $module = 'Index';
72 $controller = 'Index'; 71 $controller = 'Index';
73 $action = 'Index'; 72 $action = 'Index';
74 -  
75 - // 二级域名 73 + // 三级域名
76 if (2 === $level) { 74 if (2 === $level) {
77 $subDomain = strval($hostParts[0]); 75 $subDomain = strval($hostParts[0]);
78 switch (strtolower($subDomain)) { 76 switch (strtolower($subDomain)) {
79 - case 'www': // 主站  
80 - case 'new': // 原新版  
81 - case 'dev': // 开发环境 77 + case 'm': // 老版(到频道选择)
  78 + case 'buy': // 测试环境的域名, 以后可去掉
  79 + case 'login': // 登录
  80 + break;
  81 + case 'new': // 原新版(到男生首页)
  82 + $controller = 'Boys';
82 break; 83 break;
83 case 'search': // 搜索 84 case 'search': // 搜索
84 $controller = 'Search'; 85 $controller = 'Search';
@@ -88,12 +89,12 @@ class Bootstrap extends Bootstrap_Abstract @@ -88,12 +89,12 @@ class Bootstrap extends Bootstrap_Abstract
88 $module = 'Guang'; 89 $module = 'Guang';
89 break; 90 break;
90 case 'list': // 商品列表 91 case 'list': // 商品列表
  92 + case 'item': // 商品详情
91 $module = 'Product'; 93 $module = 'Product';
92 break; 94 break;
93 - case 'sale'://促销  
94 - $module = 'Product';  
95 - $controller = 'sale';  
96 - 95 + case 'cart': // 购物车
  96 + $module = 'Cart';
  97 + break;
97 default: // 其它(识别为品牌) 98 default: // 其它(识别为品牌)
98 $module = 'Product'; 99 $module = 'Product';
99 $action = 'Brand'; 100 $action = 'Brand';
@@ -104,6 +105,7 @@ class Bootstrap extends Bootstrap_Abstract @@ -104,6 +105,7 @@ class Bootstrap extends Bootstrap_Abstract
104 $dispatcher->getRequest()->module = $module; 105 $dispatcher->getRequest()->module = $module;
105 $dispatcher->getRequest()->controller = $controller; 106 $dispatcher->getRequest()->controller = $controller;
106 $dispatcher->getRequest()->action = $action; 107 $dispatcher->getRequest()->action = $action;
  108 +
107 /* 根据对应模块的配置,添加相应的路由规则 */ 109 /* 根据对应模块的配置,添加相应的路由规则 */
108 $iniFile = APPLICATION_PATH . '/configs/routes.' . strtolower($module) . '.ini'; 110 $iniFile = APPLICATION_PATH . '/configs/routes.' . strtolower($module) . '.ini';
109 if (file_exists($iniFile)) { 111 if (file_exists($iniFile)) {
1 <?php 1 <?php
2 use Action\WebAction; 2 use Action\WebAction;
3 use Index\HomeModel; 3 use Index\HomeModel;
4 - 4 +use Plugin\Captcha;
5 /** 5 /**
6 * 女首 6 * 女首
7 */ 7 */
@@ -18,4 +18,5 @@ class GirlsController extends WebAction @@ -18,4 +18,5 @@ class GirlsController extends WebAction
18 ); 18 );
19 $this->_view->display('index', $data); 19 $this->_view->display('index', $data);
20 } 20 }
  21 +
21 } 22 }
1 -<?php 1 +<?php
2 use Yaf\Application; 2 use Yaf\Application;
3 3
4 define('SITE_MAIN', 'http://web.dev.yohobuy.com'); // 网站主域名 4 define('SITE_MAIN', 'http://web.dev.yohobuy.com'); // 网站主域名