当前位置: 首页>>代码示例>>PHP>>正文


PHP WebRequest::detectServer方法代码示例

本文整理汇总了PHP中WebRequest::detectServer方法的典型用法代码示例。如果您正苦于以下问题:PHP WebRequest::detectServer方法的具体用法?PHP WebRequest::detectServer怎么用?PHP WebRequest::detectServer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WebRequest的用法示例。


在下文中一共展示了WebRequest::detectServer方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testDetectServer

 /**
  * @dataProvider provideDetectServer
  * @covers WebRequest::detectServer
  * @covers WebRequest::detectProtocol
  */
 public function testDetectServer($expected, $input, $description)
 {
     $this->setMwGlobals('wgAssumeProxiesUseDefaultProtocolPorts', true);
     $_SERVER = $input;
     $result = WebRequest::detectServer();
     $this->assertEquals($expected, $result, $description);
 }
开发者ID:paladox,项目名称:mediawiki,代码行数:12,代码来源:WebRequestTest.php

示例2: testDetectServer

 /**
  * @dataProvider provideDetectServer
  */
 function testDetectServer($expected, $input, $description)
 {
     $oldServer = $_SERVER;
     $_SERVER = $input;
     $result = WebRequest::detectServer();
     $_SERVER = $oldServer;
     $this->assertEquals($expected, $result, $description);
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:11,代码来源:WebRequestTest.php

示例3:

 * URL of the server.
 *
 * Example:
 * <code>
 * $wgServer = 'http://example.com';
 * </code>
 *
 * This is usually detected correctly by MediaWiki. If MediaWiki detects the
 * wrong server, it will redirect incorrectly after you save a page. In that
 * case, set this variable to fix it.
 *
 * If you want to use protocol-relative URLs on your wiki, set this to a
 * protocol-relative URL like '//example.com' and set $wgCanonicalServer
 * to a fully qualified URL.
 */
$wgServer = WebRequest::detectServer();
/**
 * Canonical URL of the server, to use in IRC feeds and notification e-mails.
 * Must be fully qualified, even if $wgServer is protocol-relative.
 *
 * Defaults to $wgServer, expanded to a fully qualified http:// URL if needed.
 */
$wgCanonicalServer = false;
/************************************************************************/
/**
 * @name   Script path settings
 * @{
 */
/**
 * The path we should point to.
 * It might be a virtual path in case with use apache mod_rewrite for example.
开发者ID:schwarer2006,项目名称:wikia,代码行数:31,代码来源:DefaultSettings.php

示例4: envCheckServer

 /**
  * Environment check for the server hostname.
  */
 protected function envCheckServer($srv = null)
 {
     if ($srv) {
         // wgServer was pre-defined, perhaps by the cli installer
         $server = $srv;
     } else {
         $server = WebRequest::detectServer();
     }
     $this->showMessage('config-using-server', $server);
     $this->setVar('wgServer', $server);
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:14,代码来源:Installer.php

示例5: envGetDefaultServer

 protected function envGetDefaultServer()
 {
     return WebRequest::detectServer();
 }
开发者ID:Grprashanthkumar,项目名称:ColfusionWeb,代码行数:4,代码来源:WebInstaller.php

示例6: envCheckServer

 /**
  * Environment check for the server hostname.
  */
 protected function envCheckServer()
 {
     $server = WebRequest::detectServer();
     $this->showMessage('config-using-server', $server);
     $this->setVar('wgServer', $server);
 }
开发者ID:namrenni,项目名称:mediawiki,代码行数:9,代码来源:Installer.php


注:本文中的WebRequest::detectServer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。