一位网友给ytkah反映说phpcms站点域名配置https无法提交,在后台修改站点域名为https提交后提示“站点域名格式应该为http://www.phpcms.cn/,请以‘/’结束”,这个要如何修改呢?通过关键词定位我们找到文件的修改路径/phpcms/modules/admin/site.php,第一步:大概89行找到
if (!empty($domain) && !preg_match('/http:\/\/(.+)\/$/i', $domain)) {
showmessage(L('site_domain').L('site_domain_ex2'));
}
将它改成
if (!empty($domain) && !preg_match('/https:\/\/(.+)\/$/i', $domain)) {
showmessage(L('site_domain').L('site_domain_ex2'));
}
第二步:再找到255行左右
if (!empty($domain) && !preg_match('/http:\/\/(.+)\/$/i', $domain)) {
showmessage(L('site_domain').L('site_domain_ex2'));
}
改成
if (!empty($domain) && !preg_match('/https:\/\/(.+)\/$/i', $domain)) {
showmessage(L('site_domain').L('site_domain_ex2'));
}
保存上传,重新更改网站域名加https就不会弹出错误提示了。
扫一扫程序员咨询
扫一扫官方公众号
网站免费预设计,满意后再签合同,开发票。
程序员接单!无中介费用,纯开发费用,公开透明,中途绝无加价情况
10年的网站开发经验,拥有丰富的网站源代码,快速解决客户网站需求
常年微信售后,当天解决网站出现的各种运维问题,让你的网络营销无后顾之忧。