- A+
所属分类:好文分享
刚才在本地升级主题,还没更新完就点到别的东西,然后就出现”正在执行例行维护,请一分钟后回来”的提示,等了半天没啥用,就上网搜了下解决方法,网上说可能是无法创建目录,修改 /wp_admin/includes/class-wp-filesystem-direct.php 文件中的function_mkdir函数, 修改如下:
function mkdir($path, $chmod = false, $chown = false, $chgrp= false) {
// safe mode fails with a trailing slash under certain PHP versions.
$path = untrailingslashit($path);
if ( empty($path) )
$path = '/';
if ( ! $chmod )
$chmod = $this->permission;
if (ini_get('safe_mode')&& substr($path,-1) == '/')
{
$path = substr($path,0,-1);
}
if ( ! @mkdir($path) )
return false;
$this->chmod($path, $chmod);
if ( $chown )
$this->chown($path, $chown);
if ( $chgrp )
$this->chgrp($path, $chgrp);
return true;
}
// safe mode fails with a trailing slash under certain PHP versions.
$path = untrailingslashit($path);
if ( empty($path) )
$path = '/';
if ( ! $chmod )
$chmod = $this->permission;
if (ini_get('safe_mode')&& substr($path,-1) == '/')
{
$path = substr($path,0,-1);
}
if ( ! @mkdir($path) )
return false;
$this->chmod($path, $chmod);
if ( $chown )
$this->chown($path, $chown);
if ( $chgrp )
$this->chgrp($path, $chgrp);
return true;
}
将源代码中if(!$chmod)里面的代码替换成现在的代码之后刷新一会就能回到正常的页面了.希望能帮到出现这种问题的朋友
- 我的微信
- 这是我的微信扫一扫
- 我的微信公众号
- 我的微信公众号扫一扫