WordPress功能函数allow_subdomain_install(),允许子域名安装。
用法:
allow_subdomain_install()
返回
(bool)是否允许子域安装
来源:
文件: wp-admin/includes/network.php
function allow_subdomain_install() {
$domain = preg_replace( ‘|ps://ajcxy.com/tag/http" target="_blank">https://ajcxy.com/tag/https" target="_blank">https?://([^/]+)|’, ‘$1’, get_option( ‘home’ ) );
if ( parse_url( get_option( ‘home’ ), PHP_URL_PATH ) || ‘localhost’ === $domain || preg_match( ‘|^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$|’, $domain ) ) {
return false;
}
return true;
}
更新日志: