pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    <bdo id='eroq5'></bdo><ul id='eroq5'></ul>

  • <small id='eroq5'></small><noframes id='eroq5'>

  • <tfoot id='eroq5'></tfoot>
    <i id='eroq5'><tr id='eroq5'><dt id='eroq5'><q id='eroq5'><span id='eroq5'><b id='eroq5'><form id='eroq5'><ins id='eroq5'></ins><ul id='eroq5'></ul><sub id='eroq5'></sub></form><legend id='eroq5'></legend><bdo id='eroq5'><pre id='eroq5'><center id='eroq5'></center></pre></bdo></b><th id='eroq5'></th></span></q></dt></tr></i><div class="vhvvxnf" id='eroq5'><tfoot id='eroq5'></tfoot><dl id='eroq5'><fieldset id='eroq5'></fieldset></dl></div>

    1. <legend id='eroq5'><style id='eroq5'><dir id='eroq5'><q id='eroq5'></q></dir></style></legend>

        如何在路由 INI 文件中為 Zend Framework 中的子域編

        How do I write Routing Chains for a Subdomain in Zend Framework in a routing INI file?(如何在路由 INI 文件中為 Zend Framework 中的子域編寫路由鏈?)
          <bdo id='QkcsD'></bdo><ul id='QkcsD'></ul>
              <legend id='QkcsD'><style id='QkcsD'><dir id='QkcsD'><q id='QkcsD'></q></dir></style></legend>
                <tbody id='QkcsD'></tbody>

                  <i id='QkcsD'><tr id='QkcsD'><dt id='QkcsD'><q id='QkcsD'><span id='QkcsD'><b id='QkcsD'><form id='QkcsD'><ins id='QkcsD'></ins><ul id='QkcsD'></ul><sub id='QkcsD'></sub></form><legend id='QkcsD'></legend><bdo id='QkcsD'><pre id='QkcsD'><center id='QkcsD'></center></pre></bdo></b><th id='QkcsD'></th></span></q></dt></tr></i><div class="5rhrfjf" id='QkcsD'><tfoot id='QkcsD'></tfoot><dl id='QkcsD'><fieldset id='QkcsD'></fieldset></dl></div>
                1. <tfoot id='QkcsD'></tfoot>

                2. <small id='QkcsD'></small><noframes id='QkcsD'>

                3. 本文介紹了如何在路由 INI 文件中為 Zend Framework 中的子域編寫路由鏈?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試使用 Zend 路由器創(chuàng)建一個子域,然后為子域下的每個部分(例如 subdomain.site.com/section/)創(chuàng)建另一個路由,然后嘗試將其鏈接到子域路由.但我不知道怎么做.我已經(jīng)閱讀了我能找到的所有文檔和所有論壇,但它讓我自己弄清楚了.到目前為止,我的嘗試只會讓我出現(xiàn)這個錯誤:

                  I am trying to create a subdomain using the Zend Router, and then for each section under a subdomain, such as subdomain.site.com/section/ I am creating another route and then trying to chain it to the subdomain route. but I don't know how. I have read all the documentation I could find and all the forums, but it leads me to figure it out on my own. So far, my attempts just get me this error:

                  可捕獲的致命錯誤:參數(shù) 2 傳遞給Zend_Controller_Router_Rewrite::addRoute() 必須實現(xiàn)接口Zend_Controller_Router_Route_Interface, null 給定, 調(diào)用/var/local/zend/library/Zend/Controller/Router/Rewrite.php 第 155 行并定義在/var/local/zend/library/Zend/Controller/Router/Rewrite.php 第 93 行

                  Catchable fatal error: Argument 2 passed to Zend_Controller_Router_Rewrite::addRoute() must implement interface Zend_Controller_Router_Route_Interface, null given, called in /var/local/zend/library/Zend/Controller/Router/Rewrite.php on line 155 and defined in /var/local/zend/library/Zend/Controller/Router/Rewrite.php on line 93

                  使用以下代碼:

                  routes.b2b.type = "Zend_Controller_Router_Route_Hostname"
                  routes.b2b.route = "sales.sitename.com"
                  routes.b2b.defaults.module = b2b
                  routes.b2b.defaults.controller = index
                  routes.b2b.defaults.action = index
                  
                  routes.b2b_signup.type = "Zend_Controller_Router_Route_Static"
                  routes.b2b_signup.route = "/signup"
                  routes.b2b_signup.defaults.controller = "index"
                  routes.b2b_signup.defaults.action   = "signup"
                  
                  routes.b2b_login.type = "Zend_Controller_Router_Route_Chain"
                  routes.b2b_login.chain = b2b_signup
                  

                  我找不到如何將其與網(wǎng)絡(luò)上任何地方的 INI 文件鏈接的示例.整個應(yīng)用程序是用 INI 編寫的,用于路由配置,因此我無法將其切換到基于數(shù)組的配置(或 XML),其中 100% 的互聯(lián)網(wǎng)示例都在其中.

                  I cannot find an example of how to do chaining this with an INI file anywhere on the net. The entire application is written in an INI for the routing config, so I can't switch it over to an array based config (or XML for that matter), in which 100% of the examples on the internet are in.

                  如果我可以用數(shù)組形式來做,我可以這樣說:

                  If I could do it in array form, I could just say this:

                  $hostnameRoute = new Zend_Controller_Router_Route_Hostname(
                      'sales.sitename.com',
                      array(
                          'controller' => 'index',
                          'module'     => 'b2b',
                          'action'     => 'index'
                      )
                  );
                  
                  $hostnameRoute = new Zend_Controller_Router_Route_Static(
                      '/signup',
                      array(
                          'controller' => 'index',
                          'module'     => 'b2b',
                          'action'     => 'signup'
                      )
                  );
                      $chainedRoute = new Zend_Controller_Router_Route_Chain();
                      $chainedRoute->chain($b2b_signup)
                  

                  有人對如何在 INI 文件中執(zhí)行上述操作有任何想法嗎?

                  Does anyone have any ideas on how to do the above in an INI file?

                  推薦答案

                  這里基本上是你想要的,INI 格式:

                  Here's basically what you want, in INI format:

                  routes.b2b.type = "Zend_Controller_Router_Route_Hostname"
                  routes.b2b.route = "sales.sitename.com"
                  ; you could specify a default module (or anything) to use for the whole 
                  ; route chain here, like so: 
                  ; routes.b2b.defaults.module = "default"
                  
                  routes.b2b.chains.signup.type = "Zend_Controller_Router_Route_Static"
                  routes.b2b.chains.signup.route = "/signup"
                  routes.b2b.chains.signup.defaults.controller = "index"
                  routes.b2b.chains.signup.defaults.action = "signup"
                  
                  routes.b2b.chains.anotherroute.route = "/something/:foo" ; etc, etc.
                  routes.b2b.chains.anotherroute.defaults.action = "foo"
                  routes.b2b.chains.anotherroute.defaults.controller = "index"
                  routes.b2b.chains.anotherroute.defaults.foo = "bar"
                  routes.b2b.chains.anotherroute.reqs.foo = '[a-z]+'
                  

                  這將為您提供以下路由:b2b-signupb2b-anotherroute.

                  This will give you the following routes: b2b-signup, and b2b-anotherroute.

                  這里有一些關(guān)于路由鏈接的重要說明:

                  Here's some important notes on route chaining:

                  將路由鏈接在一起時,外部路由的參數(shù)比內(nèi)部路由的參數(shù)具有更高的優(yōu)先級.因此,如果你在外部和內(nèi)部路由中定義了一個控制器,則外部路由的控制器將被選中.

                  When chaining routes together, the parameters of the outer route have a higher priority than the parameters of the inner route. Thus if you define a controller in the outer and in the inner route, the controller of the outer route will be selected.

                  父/子鏈式路由名稱總是用破折號連接!所以,就像上面的例子一樣,b2b.chains.signup 變成了一個名為 b2b-signup 的路由(你可以用它來組裝 URL,等等).

                  Parent / child chained route names are always concatenated with a dash! So, like in the example above, b2b.chains.signup becomes a route named b2b-signup (which you can use for URL assembly, etc).

                  你可以繼續(xù)鏈接!鏈鏈可以有鏈.

                  You can keep chaining! Chains of chains can have chains.

                  鏈式路由的子級不能使用通配符.請參閱 #ZF-6654.這是博文談?wù)摓槭裁催@可能不是什么大問題.

                  Children of chained routes do not work with wildcards. See #ZF-6654. Here's blog post that talks about why that may not be a big deal.

                  這篇關(guān)于如何在路由 INI 文件中為 Zend Framework 中的子域編寫路由鏈?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術(shù)方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅(qū)動程序)
                  <legend id='JwVEh'><style id='JwVEh'><dir id='JwVEh'><q id='JwVEh'></q></dir></style></legend>
                4. <i id='JwVEh'><tr id='JwVEh'><dt id='JwVEh'><q id='JwVEh'><span id='JwVEh'><b id='JwVEh'><form id='JwVEh'><ins id='JwVEh'></ins><ul id='JwVEh'></ul><sub id='JwVEh'></sub></form><legend id='JwVEh'></legend><bdo id='JwVEh'><pre id='JwVEh'><center id='JwVEh'></center></pre></bdo></b><th id='JwVEh'></th></span></q></dt></tr></i><div class="b7vnbnp" id='JwVEh'><tfoot id='JwVEh'></tfoot><dl id='JwVEh'><fieldset id='JwVEh'></fieldset></dl></div>

                      <tbody id='JwVEh'></tbody>
                    <tfoot id='JwVEh'></tfoot>

                      <bdo id='JwVEh'></bdo><ul id='JwVEh'></ul>

                            <small id='JwVEh'></small><noframes id='JwVEh'>

                            主站蜘蛛池模板: 专业生产动态配料系统_饲料配料系统_化肥配料系统等配料系统-郑州鑫晟重工机械有限公司 | 石家庄小程序开发_小程序开发公司_APP开发_网站制作-石家庄乘航网络科技有限公司 | 龙门加工中心-数控龙门加工中心厂家价格-山东海特数控机床有限公司_龙门加工中心-数控龙门加工中心厂家价格-山东海特数控机床有限公司 | 山西3A认证|太原AAA信用认证|投标AAA信用证书-山西AAA企业信用评级网 | 德国EA可编程直流电源_电子负载,中国台湾固纬直流电源_交流电源-苏州展文电子科技有限公司 | 【北京写字楼出租_写字楼租赁_办公室出租网/出售】-远行地产官网 | 丹佛斯变频器-丹佛斯压力开关-变送器-广州市风华机电设备有限公司 | 合肥花魁情感婚姻咨询中心_挽回爱情_修复婚姻_恋爱指南 | 油漆辅料厂家_阴阳脚线_艺术漆厂家_内外墙涂料施工_乳胶漆专用防霉腻子粉_轻质粉刷石膏-魔法涂涂 | 禹城彩钢厂_钢结构板房_彩钢复合板-禹城泰瑞彩钢复合板加工厂 | 南京交通事故律师-专打交通事故的南京律师 | 净化板-洁净板-净化板价格-净化板生产厂家-山东鸿星新材料科技股份有限公司 | 圆盘鞋底注塑机_连帮鞋底成型注塑机-温州天钢机械有限公司 | IP检测-检测您的IP质量 | 北京百度网站优化|北京网站建设公司-百谷网络科技 | 采暖炉_取暖炉_生物质颗粒锅炉_颗粒壁炉_厂家加盟批发_烟台蓝澳采暖设备有限公司 | 东莞爱加真空科技有限公司-进口真空镀膜机|真空镀膜设备|Polycold维修厂家 | 离子色谱自动进样器-青岛艾力析实验科技有限公司 | 河南卓美创业科技有限公司-河南卓美防雷公司-防雷接地-防雷工程-重庆避雷针-避雷器-防雷检测-避雷带-避雷针-避雷塔、机房防雷、古建筑防雷等-山西防雷公司 | 液压扳手-高品质液压扳手供应商 - 液压扳手, 液压扳手供应商, 德国进口液压拉马 | 深圳天际源广告-形象堆头,企业文化墙,喷绘,门头招牌设计制作专家 | 控显科技 - 工控一体机、工业显示器、工业平板电脑源头厂家 | 美的商用净水器_美的直饮机_一级代理经销商_Midea租赁价格-厂家反渗透滤芯-直饮水批发品牌售后 | 变频器维修公司_plc维修_伺服驱动器维修_工控机维修 - 夫唯科技 变位机,焊接变位机,焊接变位器,小型变位机,小型焊接变位机-济南上弘机电设备有限公司 | 淘趣英语网 - 在线英语学习,零基础英语学习网站 | 污泥烘干机-低温干化机-工业污泥烘干设备厂家-焦作市真节能环保设备科技有限公司 | 苏州防水公司_厂房屋面外墙防水_地下室卫生间防水堵漏-苏州伊诺尔防水工程有限公司 | 等离子表面处理机-等离子表面活化机-真空等离子清洗机-深圳市东信高科自动化设备有限公司 | 国际线缆连接网 - 连接器_线缆线束加工行业门户网站 | 工业机械三维动画制作 环保设备原理三维演示动画 自动化装配产线三维动画制作公司-南京燃动数字 聚合氯化铝_喷雾聚氯化铝_聚合氯化铝铁厂家_郑州亿升化工有限公司 | 滤芯,过滤器,滤油机,贺德克滤芯,精密滤芯_新乡市宇清流体净化技术有限公司 | 南京办公用品网-办公文具用品批发-打印机耗材采购 | 发光字|标识设计|标牌制作|精神堡垒 - 江苏苏通广告有限公司 | 展厅设计公司,展厅公司,展厅设计,展厅施工,展厅装修,企业展厅,展馆设计公司-深圳广州展厅设计公司 | 大流量卧式砂磨机_强力分散机_双行星双动力混合机_同心双轴搅拌机-莱州市龙跃化工机械有限公司 | 纯水电导率测定仪-万用气体检测仪-低钠测定仪-米沃奇科技(北京)有限公司www.milwaukeeinst.cn 锂辉石检测仪器,水泥成分快速分析仪-湘潭宇科分析仪器有限公司 手术室净化装修-手术室净化工程公司-华锐手术室净化厂家 | SF6环境监测系统-接地环流在线监测装置-瑟恩实业 | 压砖机_电动螺旋压力机_粉末成型压力机_郑州华隆机械tel_0371-60121717 | 企业管理培训,企业培训公开课,企业内训课程,企业培训师 - 名课堂企业管理培训网 | 合景一建-无尘车间设计施工_食品医药洁净车间工程装修总承包公司 | 骨密度仪-骨密度测定仪-超声骨密度仪-骨龄测定仪-天津开发区圣鸿医疗器械有限公司 |