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

  一位网友给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就不会弹出错误提示了。

posted @ 2019-05-27 16:39  ytkah  阅读(846)  评论(0编辑  收藏  举报
IPO发家故事 网址导航 gg N / G Sitemap

部分内容来源于网络,如有版权问题请联系删除