php 20180622 SSL対応config

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 20180622 SSL対応config相关的知识,希望对你有一定的参考价值。

/* 本番(https対応)ここから*/
// define('LOCATION', 'https://'.$_SERVER['SERVER_NAME'].str_replace($_SERVER['DOCUMENT_ROOT'], '', str_replace(DIRECTORY_SEPARATOR, '/', realpath(dirname(__FILE__)."/.."))).'/', true);


// /* SSL */
// $ssl = str_replace('https', 'https', LOCATION);
// if(empty($_SERVER['HTTPS'])) define('LOCATION_FILE', LOCATION, true);
// else define('LOCATION_FILE', $ssl, true);
/* 本番(https対応)ここまで*/


/* ローカルここから*/
define('LOCATION', 'http://'.$_SERVER['SERVER_NAME'].str_replace($_SERVER['DOCUMENT_ROOT'], '', str_replace(DIRECTORY_SEPARATOR, '/', realpath(dirname(__FILE__)."/.."))).'/', true);


/* SSL */
$ssl = str_replace('http', 'https', LOCATION);
if(empty($_SERVER['HTTPS'])) define('LOCATION_FILE', LOCATION, true);
else define('LOCATION_FILE', $ssl, true);
/* ローカルここまで*/

以上是关于php 20180622 SSL対応config的主要内容,如果未能解决你的问题,请参考以下文章

php カスタム投稿のbogo対応

通过 wp-config.php 在 wordpress 上正确强制 SSL

php [php:mb_str_replace()] DBがutf8じゃないfuckoff案件でstr_replaceする场合のマルチバイト対応。#php

apache_conf WordPress .htaccess配置文件。允许强制SSL,隐藏wp-config.php,标头ETag,GZIP压缩和过期缓存。

26期20180622压缩工具

コナン純黒のナイトメア20180622