| Server IP : 34.67.85.211 / Your IP : 216.73.217.52 Web Server : Apache System : Linux wordpress-1-vm 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64 User : root ( 0) PHP Version : 7.4.9 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /var/www/html/wp-content/plugins/wp-super-cache/ |
Upload File : |
<?php
global $WPSC_HTTP_HOST, $cache_enabled, $cache_path, $blogcacheid, $blog_cache_dir;
if ( ! empty( $_SERVER['HTTP_HOST'] ) ) {
$WPSC_HTTP_HOST = function_exists( 'mb_strtolower' ) ? mb_strtolower( $_SERVER['HTTP_HOST'] ) : strtolower( $_SERVER['HTTP_HOST'] );
$WPSC_HTTP_HOST = htmlentities( $WPSC_HTTP_HOST );
} elseif ( PHP_SAPI === 'cli' && function_exists( 'get_option' ) ) {
$WPSC_HTTP_HOST = (string) parse_url( get_option( 'home' ), PHP_URL_HOST );
} else {
$cache_enabled = false;
$WPSC_HTTP_HOST = '';
}
// We want to be able to identify each blog in a WordPress MU install
$blogcacheid = '';
$blog_cache_dir = $cache_path;
if ( is_multisite() ) {
global $current_blog;
if ( is_object( $current_blog ) && function_exists( 'is_subdomain_install' ) ) {
$blogcacheid = is_subdomain_install() ? $current_blog->domain : trim( $current_blog->path, '/' );
} elseif ( ( defined( 'SUBDOMAIN_INSTALL' ) && SUBDOMAIN_INSTALL ) || ( defined( 'VHOST' ) && VHOST === 'yes' ) ) {
$blogcacheid = $WPSC_HTTP_HOST;
} else {
$request_uri = str_replace( '..', '', preg_replace( '/[ <>\'\"\r\n\t\(\)]/', '', $_SERVER['REQUEST_URI'] ) );
$request_uri = str_replace( '//', '/', $request_uri );
$wpsc_path_segs = array_filter( explode( '/', trim( $request_uri, '/' ) ) );
$wpsc_base_count = defined( 'PATH_CURRENT_SITE' ) ? count( array_filter( explode( '/', trim( PATH_CURRENT_SITE, '/' ) ) ) ) : 0;
if ( '/' !== substr( $request_uri, -1 ) ) {
$wpsc_path_segs = array_slice( $wpsc_path_segs, 0, -1 );
}
if ( count( $wpsc_path_segs ) > $wpsc_base_count &&
( ! defined( 'PATH_CURRENT_SITE' ) || 0 === strpos( $request_uri, PATH_CURRENT_SITE ) )
) {
$blogcacheid = $wpsc_path_segs[ $wpsc_base_count ];
}
}
// If blogcacheid is empty then set it to main blog.
if ( empty( $blogcacheid ) ) {
$blogcacheid = 'blog';
}
$blog_cache_dir = str_replace( '//', '/', $cache_path . 'blogs/' . $blogcacheid . '/' );
}