phpcms站点域名配置https无法提交如何处理

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就不会弹出错误提示了。

猜你喜欢

转载自www.cnblogs.com/yuan9580/p/12147943.html
今日推荐