本文整理汇总了PHP中Director::test_servers方法的典型用法代码示例。如果您正苦于以下问题:PHP Director::test_servers方法的具体用法?PHP Director::test_servers怎么用?PHP Director::test_servers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Director
的用法示例。
在下文中一共展示了Director::test_servers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/**
* Specify HTTP_HOST values that are test environments.
* For information about environment types, see {@link Director::set_environment_type()}.
*
* CAUTION: Domain information can easily be spoofed in HTTP requests,
* we recommend to set this mode via {@link Director::set_environment_type()}
* or an _ss_environment.php instead.
*
* @param $servers array An array of HTTP_HOST values that should be treated as test environments.
*/
static function set_test_servers($servers)
{
Director::$test_servers = $servers;
}
示例2:
/**
* Specify HTTP_HOST values that are test environments.
* For information about environment types, see {@link Director::set_environment_type()}.
*
* CAUTION: Domain information can easily be spoofed in HTTP requests,
* we recommend to set this mode via {@link Director::set_environment_type()}
* or an _ss_environment.php instead.
*
* @deprecated 3.0 Use Director::set_environment_type() or an _ss_environment.php instead.
* @param $servers array An array of HTTP_HOST values that should be treated as test environments.
*/
static function set_test_servers($servers)
{
Deprecation::notice('3.0', 'Use Director::set_environment_type() or an _ss_environment.php instead.');
Director::$test_servers = $servers;
}