Home > php教程 > php手册 > 让子域名支持带端口号的形式

让子域名支持带端口号的形式

WBOY
Release: 2016-06-07 11:36:55
Original
1699 people have browsed it

目前当我们的域名后需要携带端口号进行访问时,子域名部署不会传递端口号。
目前当我们的域名后需要携带端口号进行访问时,子域名部署不会传递端口号。
解决方案:
找到ThinkPHP/Common/functions.php第878行        $domain = $key.(preg_match('/\.(cn|com|org|net|cc)$/i',$key)?'':strstr($domain,'.')); // 生成对应子域名修改为        list($key,$port) = explode(':',$key);<br>         $domain = $key.(preg_match('/\.(cn|com|org|net|cc)$/i',$key)?'':strstr($domain,'.')).($port?':'.$port:''); // 生成对应子域名,兼容带端口号的子域名

AD:真正免费,域名+虚机+企业邮箱=0元

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template