WordPress开发者和主题制作者的搜索引擎



is_lighttpd_before_150 ›

Since2.5.0
已弃用n/a
is_lighttpd_before_150 ( 没有参数 )
返回:
  • (bool) Whether the server is running lighttpd < 1.5.0.
定义在:
文档:

Is the server running earlier than 1.5.0 version of lighttpd?



Related Functions: is_allowed_http_origin

源码

function is_lighttpd_before_150() {
	$server_parts    = explode( '/', isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '' );
	$server_parts[1] = isset( $server_parts[1] ) ? $server_parts[1] : '';
	return  'lighttpd' == $server_parts[0] && -1 == version_compare( $server_parts[1], '1.5.0' );
}