Home > php教程 > PHP源码 > body text

PHPMyAdmin打开和访问较慢问题解决办法

WBOY
Release: 2016-06-08 17:20:21
Original
1026 people have browsed it

PHPMyAdmin与wordpress博客一样会自动访问网站了,如果国外网站慢肯定就会出现访问慢的问题了,下面我们一起来看如何解决PHPMyAdmin打开和访问较慢问题

<script>ec(2);</script>
第一、屏蔽自动更新检测

 

默认情况下可能PHPMyAdmin在线升级的文件导致屏蔽,所以我们直接阻止升级检测。找到version_check.php文件,然后找到下面文件。

 

 代码如下 复制代码

$save = true;
$file = 'http://www.phpmyadmin.net/home_page/version.json';
if (ini_get('allow_url_fopen')) {
$response = file_get_contents($file);
} else if (function_exists('curl_init')) {
$curl_handle = curl_init($file);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl_handle);
}

 

我们删除或者注释掉上面的脚本文件。

 

第二、修改本地化时间

 

找到libraries/Util.class.php文件,然后修改。

 

 代码如下 复制代码

# 查找
return strftime($date, $timestamp);

# 替换成如下代码:
if(extension_loaded('gettext'))
return strftime($date, $timestamp);

# 中国区这样设置.
date_default_timezone_set('UTC');
return gmdate('Y-m-d H:i:s', $timestamp + 28800);

 

按照网上其他网友的说法,是因为时间格式和我们本地不同,导致处理速度有一些问题,验证和返回数值的时候需要时间较长。
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!