• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP w3_is_nginx函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中w3_is_nginx函数的典型用法代码示例。如果您正苦于以下问题:PHP w3_is_nginx函数的具体用法?PHP w3_is_nginx怎么用?PHP w3_is_nginx使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了w3_is_nginx函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: w3_get_pgcache_rules_cache_path

/**
 * Returns path of pgcache cache rules file
 * Moved to separate file to not load rule.php for each disk enhanced request
 *
 * @return string
 */
function w3_get_pgcache_rules_cache_path()
{
    switch (true) {
        case w3_is_apache():
        case w3_is_litespeed():
            if (w3_is_network()) {
                $url = w3_get_home_url();
                $match = null;
                if (preg_match('~http(s)?://(.+?)(/)?$~', $url, $match)) {
                    $home_path = $match[2];
                    return W3TC_CACHE_PAGE_ENHANCED_DIR . '/' . $home_path . '/.htaccess';
                }
            }
            return W3TC_CACHE_PAGE_ENHANCED_DIR . '/.htaccess';
        case w3_is_nginx():
            return w3_get_nginx_rules_path();
    }
    return false;
}
开发者ID:gumbysgoo,项目名称:bestilblomster,代码行数:25,代码来源:rule_cut.php


示例2: allow_origin

 /**
  * Returns allow-origin rules
  *
  * @param bool $cdnftp
  * @return string
  */
 public function allow_origin($cdnftp = false)
 {
     switch (true) {
         case w3_is_apache():
         case w3_is_litespeed():
             $r = "<IfModule mod_headers.c>\n";
             $r .= "    Header set Access-Control-Allow-Origin \"*\"\n";
             $r .= "</IfModule>\n";
             if (!$cdnftp) {
                 return $r;
             } else {
                 return "<FilesMatch \"\\.(ttf|ttc|otf|eot|woff|font.css)\$\">\n" . $r . "</FilesMatch>\n";
             }
         case w3_is_nginx():
             $r = "   add_header Access-Control-Allow-Origin \"*\";\n";
             if (!$cdnftp) {
                 return $r;
             } else {
                 return "location ~ \\.(ttf|ttc|otf|eot|woff|font.css)\$ {\n" . $r . "}\n";
             }
     }
     return '';
 }
开发者ID:gumbysgoo,项目名称:bestilblomster,代码行数:29,代码来源:SharedRules.php


示例3: rules_no404wp_generate

 /**
  * Generate rules related to prevent for media 404 error by WP
  *
  * @param W3_Config $config
  * @return string
  */
 private function rules_no404wp_generate($config)
 {
     switch (true) {
         case w3_is_apache():
         case w3_is_litespeed():
             return $this->rules_no404wp_generate_apache($config);
         case w3_is_nginx():
             return $this->rules_no404wp_generate_nginx($config);
     }
     return false;
 }
开发者ID:gumbysgoo,项目名称:bestilblomster,代码行数:17,代码来源:BrowserCacheAdminEnvironment.php


示例4: generate_rules

 /**
  * Returns rules
  *
  * @param bool $cdnftp
  * @return string
  */
 function generate_rules($cdnftp = false)
 {
     switch (true) {
         case w3_is_apache():
         case w3_is_litespeed():
             return $this->generate_rules_apache($cdnftp);
         case w3_is_nginx():
             return $this->generate_rules_nginx($cdnftp);
     }
     return false;
 }
开发者ID:marqui678,项目名称:finalchance.Panopta,代码行数:17,代码来源:CdnAdmin.php


示例5: _get_page_key

 /**
  * Returns page key
  *
  * @param string $mobile_group
  * @param string $referrer_group
  * @param string $encryption
  * @param string $compression
  * @param string $content_type
  * @param string $request_uri
  * @return string
  */
 function _get_page_key($mobile_group = '', $referrer_group = '', $encryption = '', $compression = '', $content_type = '', $request_uri = '')
 {
     if ($request_uri) {
         $key = substr($request_uri, strtolower(substr($request_uri, 0, 8)) == 'https' ? 8 : 7);
     } else {
         $key = $this->_request_host . $this->_request_uri;
     }
     // replace fragment
     $key = preg_replace('~#.*$~', '', $key);
     if ($this->_enhanced_mode) {
         // URL decode
         $key = urldecode($key);
         // replace double slashes
         $key = preg_replace('~[/\\\\]+~', '/', $key);
         // replace query string
         $key = preg_replace('~\\?.*$~', '', $key);
         // replace index.php
         $key = str_replace('/index.php', '/', $key);
         // trim slash
         $key = ltrim($key, '/');
         if ($key && substr($key, -1) != '/') {
             $key .= '/';
         }
         $key .= '_index';
     } else {
         if ($this->_check_query_string()) {
             // replace query string
             $key = preg_replace('~\\?.*$~', '', $key);
         }
         $key = md5($key);
     }
     /**
      * Append mobile group
      */
     if ($mobile_group) {
         $key .= '_' . $mobile_group;
     }
     /**
      * Append referrer group
      */
     if ($referrer_group) {
         $key .= '_' . $referrer_group;
     }
     /**
      * Append encryption
      */
     if ($encryption) {
         $key .= '_' . $encryption;
     }
     if (w3_is_preview_mode()) {
         $key .= '_preview';
     }
     if ($this->_enhanced_mode) {
         /**
          * Append HTML extension.
          * For nginx - we create .xml cache entries and redirect to them
          */
         if (w3_is_nginx() && substr($content_type, 0, 8) == 'text/xml' && $this->_config->get_boolean('pgcache.cache.nginx_handle_xml')) {
             $key .= '.xml';
         } else {
             $key .= '.html';
         }
     }
     /**
      * Append compression
      */
     if ($compression) {
         $key .= '_' . $compression;
     }
     return $key;
 }
开发者ID:easinewe,项目名称:Avec2016,代码行数:82,代码来源:PgCache.php


示例6: w3_add_rules

/**
 * @param SelfTestExceptions $exs
 * @param string $path
 * @param string $rules
 * @param string $start
 * @param string $end
 * @param array $order
 */
function w3_add_rules($exs, $path, $rules, $start, $end, $order)
{
    $data = @file_get_contents($path);
    if ($data === false) {
        $data = '';
    }
    $rules_missing = !empty($rules) && strstr(w3_clean_rules($data), w3_clean_rules($rules)) === false;
    if (!$rules_missing) {
        return;
    }
    $replace_start = strpos($data, $start);
    $replace_end = strpos($data, $end);
    if ($replace_start !== false && $replace_end !== false && $replace_start < $replace_end) {
        $replace_length = $replace_end - $replace_start + strlen($end) + 1;
    } else {
        $replace_start = false;
        $replace_length = 0;
        $search = $order;
        foreach ($search as $string => $length) {
            $replace_start = strpos($data, $string);
            if ($replace_start !== false) {
                $replace_start += $length;
                break;
            }
        }
    }
    if ($replace_start !== false) {
        $data = w3_trim_rules(substr_replace($data, $rules, $replace_start, $replace_length));
    } else {
        $data = w3_trim_rules($data . $rules);
    }
    if (strpos($path, W3TC_CACHE_DIR) === false || w3_is_nginx()) {
        try {
            w3_wp_write_to_file($path, $data);
        } catch (FilesystemOperationException $ex) {
            if ($replace_start !== false) {
                $exs->push(new FilesystemModifyException($ex->getMessage(), $ex->credentials_form(), sprintf(__('Edit file <strong>%s
                        </strong> and replace all lines between and including <strong>%s</strong> and
                        <strong>%s</strong> markers with:', 'w3-total-caceh'), $path, $start, $end), $path, $rules));
            } else {
                $exs->push(new FilesystemModifyException($ex->getMessage(), $ex->credentials_form(), sprintf(__('Edit file <strong>%s</strong> and add the following rules
                                above the WordPress directives:', 'w3-total-cache'), $path), $path, $rules));
            }
        }
    } else {
        if (!@file_exists(dirname($path))) {
            w3_mkdir_from(dirname($path), W3TC_CACHE_DIR);
        }
        if (!@file_put_contents($path, $data)) {
            try {
                w3_wp_delete_folder(dirname($path), '', $_SERVER['REQUEST_URI']);
            } catch (FilesystemOperationException $ex) {
                $exs->push($ex);
            }
        }
    }
}
开发者ID:easinewe,项目名称:Avec2016,代码行数:65,代码来源:rule.php


示例7: canonical_generated_by

 /**
  * Checks whether canonical should be generated or not by browsercache plugin
  * @param W3_Config $config
  * @param boolean $cdnftp
  * @return string|null
  */
 public function canonical_generated_by($config, $cdnftp = false)
 {
     if (!$this->_should_canonical_be_generated($config, $cdnftp)) {
         return null;
     }
     if (w3_is_nginx()) {
         // in nginx - browsercache generates canonical if its enabled,
         // since it does not allow multiple location tags
         if ($config->get_boolean('browsercache.enabled')) {
             return 'browsercache';
         }
     }
     if ($config->get_boolean('cdn.enabled')) {
         return 'cdn';
     }
     return null;
 }
开发者ID:Supreme007,项目名称:bestilblomster,代码行数:23,代码来源:Dispatcher.php


示例8: remove_rules_cache_multisite_nginx_with_message

 /**
  * @return array
  */
 function remove_rules_cache_multisite_nginx_with_message()
 {
     $ftp_form = null;
     $errors = array();
     $errors_short_form = array();
     if (w3_is_multisite() && w3_is_nginx() && $this->check_rules_cache()) {
         try {
             $this->remove_rules_cache();
         } catch (Exception $e) {
             $errors[] = sprintf('To fully disable Page Cache Disc: Enhanced for Network Sites rules need to be removed. To remove them manually, edit the configuration file (<strong>%s</strong>) and remove all lines between and including <strong>%s</strong> and <strong>%s</strong> markers inclusive.', w3_get_pgcache_rules_core_path(), W3TC_MARKER_BEGIN_PGCACHE_CACHE, W3TC_MARKER_END_PGCACHE_CACHE);
             $errors_short_form[] = sprintf('Edit file (<strong>%s</strong>) and remove all lines between and including <strong>%s</strong> and <strong>%s</strong> markers inclusive.', w3_get_pgcache_rules_core_path(), W3TC_MARKER_BEGIN_PGCACHE_CACHE, W3TC_MARKER_END_PGCACHE_CACHE);
             if (!isset($ftp_form) && $e instanceof FilesystemCredentialException) {
                 $ftp_form = $e->ftp_form();
             }
         }
     }
     return array('errors' => $errors, 'ftp_form' => $ftp_form, 'errors_short_form' => $errors_short_form);
 }
开发者ID:marqui678,项目名称:finalchance.Panopta,代码行数:21,代码来源:PgCacheAdmin.php


示例9: w3_can_check_rules

/**
 * Returns true if we can check rules
 *
 * @return bool
 */
function w3_can_check_rules()
{
    return w3_is_apache() || w3_is_litespeed() || w3_is_nginx();
}
开发者ID:nuevomediagroup,项目名称:nmg-code,代码行数:9,代码来源:define.php


示例10: w3_get_cdn_rules_path

/**
 * Returns path of minify rules file
 *
 * @return string
 */
function w3_get_cdn_rules_path()
{
    switch (true) {
        case w3_is_apache():
        case w3_is_litespeed():
            return '.htaccess';
        case w3_is_nginx():
            return 'nginx.conf';
    }
    return false;
}
开发者ID:nuevomediagroup,项目名称:nmg-code,代码行数:16,代码来源:rule.php


示例11: _e

?>
            <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php 
_e('Save all settings', 'w3-total-cache');
?>
" />
        </p>
        <?php 
echo $this->postbox_footer();
?>

        <?php 
echo $this->postbox_header(__('Media &amp; Other Files', 'w3-total-cache'), '', 'media');
?>
        <table class="form-table">
            <?php 
if (!w3_is_nginx()) {
    ?>
            <tr>
                <th colspan="2">
                    <?php 
    $this->checkbox('browsercache.other.last_modified');
    ?>
 <?php 
    w3_e_config_label('browsercache.other.last_modified');
    ?>
</label>
                    <br /><span class="description"><?php 
    _e('Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache');
    ?>
</span>
                </th>
开发者ID:easinewe,项目名称:Avec2016,代码行数:31,代码来源:browsercache.php


示例12: esc_textarea

    ?>
 disabled="disabled"<?php 
}
?>
><?php 
echo esc_textarea(implode("\r\n", $this->_config->get_array('pgcache.cache.headers')));
?>
</textarea><br />
                    <span class="description"><?php 
_e('Specify additional page headers to cache.', 'w3-total-cache');
?>
</span>
                </td>
            </tr>
            <?php 
if (w3_is_nginx() && $this->_config->get_string('pgcache.engine') == 'file_generic') {
    ?>
            <tr>
                <th><label><?php 
    _e('Handle <acronym title="Extensible Markup Language">XML</acronym> mime type', 'w3-total-cache');
    ?>
</label></th>
                <td>
                    <?php 
    $this->checkbox('pgcache.cache.nginx_handle_xml', true);
    ?>
 <?php 
    _e('Handle XML mime type', 'w3-total-cache');
    ?>
</label><br />
                    <span class="description"><?php 
开发者ID:gumbysgoo,项目名称:bestilblomster,代码行数:31,代码来源:pgcache.php


示例13: w3_can_modify_rules

/**
 * Returns true if we can modify rules
 *
 * @param string $path
 * @return boolean
 */
function w3_can_modify_rules($path)
{
    if (w3_is_network()) {
        if (w3_is_apache() || w3_is_litespeed() || w3_is_nginx()) {
            switch ($path) {
                case w3_get_pgcache_rules_cache_path():
                case w3_get_minify_rules_core_path():
                case w3_get_minify_rules_cache_path():
                    return true;
            }
        }
        return false;
    }
    return true;
}
开发者ID:marqui678,项目名称:finalchance.Panopta,代码行数:21,代码来源:rule.php


示例14: _should_browsercache_generate_canonical

 /**
  * Checks whether canonical should be generated or not
  * @param boolean $cdnftp
  * @return bool
  */
 private function _should_browsercache_generate_canonical($cdnftp = false)
 {
     return $this->_canonical_generation_general_check($cdnftp) && w3_is_nginx();
 }
开发者ID:marqui678,项目名称:finalchance.Panopta,代码行数:9,代码来源:Dispatcher.php


示例15: verify_compatibility

 /**
  * Checks if the platform running WP is supported by New Relic.
  * The verifications is based on https://newrelic.com/docs/php/new-relic-for-php
  * @return array
  */
 function verify_compatibility()
 {
     $supported_string = __('Supported', 'w3-total-cache');
     $php_versions = array('5.2.x', '5.3.x', '5.4.x');
     $verified = array();
     $version = explode('.', PHP_VERSION);
     $php_version = sprintf('%s.%s.%s', $version[0], $version[1], $version[2]);
     $php_version_check = version_compare($php_version, '5.2', '>') && version_compare($php_version, '5.5', '<');
     $verified[__('PHP version', 'w3-total-cache')] = $php_version_check ? $supported_string : sprintf(__('Not supported: %s. Supported versions are %s.', 'w3-total-cache'), $php_version, implode(', ', $php_versions));
     $os_name = php_uname('s');
     switch ($os_name) {
         case 'Linux':
             /**
              * Any other version of Linux with kernel 2.6.13 or later
              * (2.6.26 and later highly recommended) and glibc 2.5 or later
              */
             $version = explode('.', php_uname('r'));
             $os_version = sprintf('%d.%d.%d', $version[0], $version[1], $version[2]);
             $os_check = version_compare($os_version, '2.6.13', '>=');
             break;
         case 'FreeBSD':
             /**
              * You must enable the linkthr build option so that the New Relic agent will not cause your PHP to hang.
              */
             $version = explode('.', php_uname('r'));
             $os_version = sprintf('%d.%d', $version[0], $version[1]);
             $os_check = version_compare($os_version, '7.3', '>=');
             break;
         case 'MacOS/X':
             /**
              * MacOS/X configurations do not use the standard /etc/init.d/newrelic-daemon script.
              * Instead, they use /usr/bin/newrelic-daemon-service in the same way; for example:
              * /usr/bin/newrelic-daemon-service restart.
              */
             $version = explode('.', php_uname('r'));
             $os_version = sprintf('%d.%d', $version[0], $version[1]);
             $os_check = version_compare($os_version, '10.5', '>=');
             break;
         case 'Open Solaris':
             /**
              * snv_134b or later
              */
             $version = explode('.', php_uname('r'));
             $os_version = sprintf('%d', $version[0]);
             $os_check = version_compare($os_version, '10', '==');
             break;
         default:
             $os_check = false;
             $os_name = php_uname();
             $os_version = '';
     }
     $verified[__('Operating System', 'w3-total-cache')] = $os_check ? $supported_string : sprintf(__('Not Supported. %s %s See %s page.', 'w3-total-cache'), $os_name, $os_version, '<a href="https://newrelic.com/docs/php/new-relic-for-php#requirements">
                                     NewRelic requirements</a>');
     /**
      * Apache 2.2 or 2.4 via mod_php
      * Or any web server that supports FastCGI using php-fpm
      */
     $server = explode('/', $_SERVER['SERVER_SOFTWARE']);
     $ws_name = $server[0];
     $version = explode('.', $server[1]);
     $ws_version = sprintf('%d.%d', $version[0], $version[1]);
     switch (true) {
         case w3_is_apache():
             $ws_check = version_compare($ws_version, '2.2', '>=') || version_compare($ws_version, '2.4', '>=');
             break;
         case w3_is_nginx():
             $ws_check = php_sapi_name() == 'fpm-fcgi';
             $ws_name .= php_sapi_name();
             break;
         default:
             $ws_check = php_sapi_name() == 'fpm-fcgi';
             $ws_name = $_SERVER['SERVER_SOFTWARE'];
             $ws_version = '';
     }
     $verified[__('Web Server', 'w3-total-cache')] = $ws_check ? $supported_string : sprintf(__('Not Supported. %s %s See %s page.', 'w3-total-cache'), $ws_name, $ws_version, '<a href="https://newrelic.com/docs/php/new-relic-for-php#requirements">
                                     NewRelic requirements</a>');
     return $verified;
 }
开发者ID:gumbysgoo,项目名称:bestilblomster,代码行数:83,代码来源:NewRelicService.php


示例16: htmlspecialchars

        <p class="submit">
            <?php 
echo $this->nonce_field('w3tc');
?>
            <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="Save all settings" />
        </p>
        <?php 
echo $this->postbox_footer();
?>
        <?php 
echo $this->postbox_header('Miscellaneous');
?>
        <table class="form-table">
            <?php 
if (w3_is_nginx()) {
    ?>
            <tr>
                <th>Nginx server configuration file path</th>
                <td>
                    <input type="text" name="config.path" value="<?php 
    echo htmlspecialchars($this->_config->get_string('config.path'));
    ?>
" size="80" />
                    <br /><span class="description">If empty the default path will be used..</span>
                </td>
            </tr>
            <?php 
}
?>
            <tr>
开发者ID:pyropictures,项目名称:wordpress-plugins,代码行数:30,代码来源:general.php


示例17: rules_cache_generate

 /**
  * Generates directives for file cache dir
  *
  * @param W3_Config $config
  * @return string
  */
 public function rules_cache_generate($config)
 {
     switch (true) {
         case w3_is_apache():
         case w3_is_litespeed():
             return $this->rules_cache_generate_apache($config);
         case w3_is_nginx():
             return $this->rules_cache_generate_nginx($config);
     }
     return '';
 }
开发者ID:gumbysgoo,项目名称:bestilblomster,代码行数:17,代码来源:PgCacheAdminEnvironment.php


示例18: generate_rules_cache

 /**
  * Generates rules
  *
  * @return string
  */
 function generate_rules_cache()
 {
     switch (true) {
         case w3_is_apache():
             return $this->generate_rules_cache_apache();
         case w3_is_nginx():
             return $this->generate_rules_cache_nginx();
     }
     return false;
 }
开发者ID:niko-lgdcom,项目名称:archives,代码行数:15,代码来源:Minify.php


示例19: generate_rules_no404wp

 /**
  * Generate rules related to prevent for media 404 error by WP
  *
  * @return string
  */
 function generate_rules_no404wp()
 {
     switch (true) {
         case w3_is_apache():
         case w3_is_litespeed():
             return $this->generate_rules_no404wp_apache();
         case w3_is_nginx():
             return $this->generate_rules_no404wp_nginx();
     }
     return false;
 }
开发者ID:nuevomediagroup,项目名称:nmg-code,代码行数:16,代码来源:BrowserCacheAdmin.php


示例20: options

 /**
  * Options page
  *
  * @return void
  */
 function options()
 {
     $remove_results = array();
     $w3tc_error = array();
     w3_require_once(W3TC_INC_DIR . '/functions/activation.php');
     $preview = $this->_config->is_preview();
     if (w3_is_network() && !$this->is_master()) {
         $this->_config_master = new W3_Config(true);
     } else {
         $this->_config_master = $this->_config;
     }
     $w3_verify = w3_instance('W3_FileVerification');
     /**
      * Check for page cache availability
      */
     $wp_config_edit = false;
     if ($this->_config->get_boolean('pgcache.enabled')) {
         if (!defined('WP_CACHE') || !WP_CACHE) {
             try {
                 $w3_plugin_admin = w3_instance('W3_Plugin_PgCacheAdmin');
                 $w3_plugin_admin->enable_wp_cache(w3_is_network() ? network_admin_url('admin.php?page=w3tc_general') : admin_url('admin.php?page=w3tc_general'));
             } catch (Exception $e) {
                 $ftp_message = '';
                 if (!isset($this->_ftp_form) && $e instanceof FilesystemCredentialException) {
                     $this->_ftp_form = $e->ftp_form();
                     $ftp_message = ' Or use the <a href="#ftp_upload_form">FTP form</a> below.';
                 } elseif ($e instanceof FileOperationException) {
                     $file_operation_exception = true;
                     $wp_config_edit = true;
                 }
                 if (!$this->_disable_add_in_files_notification) {
                     $this->_errors[] = sprintf('Page caching is not available: please add: <strong>define(\'WP_CACHE\', true);</strong> to <strong>%s</strong>. %s', w3_get_wp_config_path(), $ftp_message);
                 }
             }
         }
         if (!$w3_verify->advanced_cache_check()) {
             if (!$this->_disable_add_in_files_notification) {
                 $this->_errors[] = sprintf('Page caching is not available. The current add-in %s is either missing, an incorrect file or an old version. De-activate the plugin, remove the file, then activate the plugin again.', W3TC_ADDIN_FILE_ADVANCED_CACHE);
             }
         } elseif ($this->_config->get_string('pgcache.engine') == 'file_generic' && $this->_config->get_boolean('config.check') && w3_can_check_rules()) {
             $w3_plugin_pgcache = w3_instance('W3_Plugin_PgCacheAdmin');
             if (w3_get_blog_id() == 0) {
                 if ($w3_plugin_pgcache->check_rules_core()) {
                     if ($this->_config->get_boolean('pgcache.debug') && !$this->test_rewrite_pgcache()) {
                         $url = w3_get_home_url() . '/w3tc_rewrite_test';
                         $key = sprintf('w3tc_rewrite_test_result_%s', substr(md5($url), 0, 16));
                         $result = get_transient($key);
                         $tech_message = '%s contains rules to rewrite url %2$s/w3tc_rewrite_test into %2$s/?w3tc_rewrite_test which, if handled by plugin, return "OK" message.<br/>';
                         $tech_message .= 'The plugin made a request to %s/w3tc_rewrite_test but received: <br />%s<br />';
                         $tech_message .= 'instead of "OK" response. <br />';
                         $tech_message .= 'Unfortunately disk enhanced page caching will not function without custom rewrite rules. Please ask your server administrator for assistance. Also refer to <a href="%s">the install page</a>  for the rules for your server.';
                         $tech_message = sprintf($tech_message, w3_is_nginx() ? 'nginx configuration file' : '.htaccess file', w3_get_home_url(), $result, admin_url('admin.php?page=w3tc_install'));
                         $error = 'It appears Page Cache <acronym title="Uniform Resource Locator">URL</acronym> rewriting is not working. If using apache, verify that the server configuration allows .htaccess. Or if using nginx verify all configuration files are included in the configuration file (and that you have reloaded / restarted nginx).';
                         $error .= ' <br /><a id="w3tc_read_technical_info" href="#">Technical info</a><div id="w3tc_technical_info">' . $tech_message . '</div>';
                         $this->_errors[] = $error;
                     }
                     if ($w3_plugin_pgcache->check_rules_has_legacy()) {
                         try {
                             $w3_plugin_pgcache->remove_rules_legacy();
                             $w3_plugin_pgcache->write_rules_core();
                         } catch (Exception $e) {
                             $this->_rule_errors_root[] = sprintf('Edit the configuration file (<strong>%s</strong>) and ' . 'remove all lines between and including <strong>%s</strong> and ' . '<strong>%s</strong> markers inclusive.', w3_get_pgcache_rules_core_path(), W3TC_MARKER_BEGIN_PGCACHE_LEGACY, W3TC_MARKER_END_PGCACHE_LEGACY);
                             if (!isset($this->_ftp_form) && $e instanceof FilesystemCredentialException) {
                                 $this->_ftp_form = $e->ftp_form();
                             } elseif ($e instanceof FileOperationException) {
                                 $file_operation_exception = true;
                             }
                         }
                     }
                 } else {
                     if ($w3_plugin_pgcache->check_rules_has_core()) {
                         $instructions = sprintf('replace the content of the server configuration ' . 'file <strong>%s</strong> between %s and %s markers inclusive. Required after modifying Page Cache / Browser Cache settings or plugin update', w3_get_pgcache_rules_core_path(), W3TC_MARKER_BEGIN_PGCACHE_CORE, W3TC_MARKER_END_PGCACHE_CORE);
                     } elseif ($w3_plugin_pgcache->check_rules_has_legacy()) {
                         $legacy = true;
                         $instructions = sprintf('replace the content of the server configuration ' . 'file <strong>%s</strong> between %s and %s markers inclusive', w3_get_pgcache_rules_core_path(), W3TC_MARKER_BEGIN_PGCACHE_LEGACY, W3TC_MARKER_END_PGCACHE_LEGACY);
                     } else {
                         $instructions = sprintf('add the following rules into the server ' . 'configuration file (<strong>%s</strong>) of the site above the ' . 'WordPress directives', w3_get_pgcache_rules_core_path());
                     }
                     if (isset($instructions)) {
                         try {
                             if (isset($legacy) && $legacy) {
                                 $w3_plugin_pgcache->remove_rules_legacy();
                             }
                             $w3_plugin_pgcache->write_rules_core();
                         } catch (Exception $e) {
                             $this->_rule_errors_root[] = sprintf('To enable Disk enhanced page caching, ' . $instructions . ' %s <textarea class="w3tc-rules"' . ' cols="120" rows="10" readonly="readonly">%s</textarea>.', $this->button('view code', '', 'w3tc-show-rules'), htmlspecialchars($w3_plugin_pgcache->generate_rules_core()));
                             if (!isset($this->_ftp_form) && $e instanceof FilesystemCredentialException) {
                                 $this->_ftp_form = $e->ftp_form();
                             } elseif ($e instanceof FileOperationException) {
                                 $file_operation_exception = true;
                             }
                         }
                     }
                 }
                 if ($this->_config->get_boolean('notes.pgcache_rules_wpsc') && $w3_plugin_pgcache->check_rules_wpsc()) {
//.........这里部分代码省略.........
开发者ID:marqui678,项目名称:finalchance.Panopta,代码行数:101,代码来源:TotalCacheAdmin.php



注:本文中的w3_is_nginx函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP w3_is_preview_mode函数代码示例发布时间:2022-05-23
下一篇:
PHP w3_is_network函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap