每次我都无法从这里导入wordpress测试数据。http://codex.wordpress.org/Theme_Unit_Test
我正在使用xampp,有时它无法导入。
感谢
在该目录中查找class-wp-http-curl.php(C:''examplep''htdocs''wordpress''wp-includs),在第240行之前输入set_time_limit(5000);
set_time_limit (5000);
curl_exec( $handle );
$theHeaders = WP_Http::processHeaders( $this->headers, $url );
$theBody = $this->body;
$bytes_written_total = $this->bytes_written_total;
您的答案在您提供的Fatal error: Maximum execution time of 60 seconds exceeded
错误中。
您应该编辑您的服务器PHP.ini以延长这60秒的限制。以240秒为例。
max_execution_time = 240 ;
在该目录中查找class-http.php(C:''examplep''htdocs''wordpress''wp-includs)在第1511行OR 1510之前,输入set_time_limit (5000);
CCD_ 4是秒。所以这个数字越大,最大执行时间就越长。所以在第1509行应该是这样的。。。
set_time_limit (5000);
curl_exec( $handle );
$theHeaders = WP_Http::processHeaders( $this->headers, $url );
$theBody = $this->body;
$bytes_written_total = $this->bytes_written_total;
导入Wordpress主题单元测试数据时出现最大执行时间超过错误
如果什么都不起作用,请尝试。
wp包含>depleted.php行号3636;WordPress V:4.8.2
函数wp_get_http($url,$file_path=false,$red=1){_depleted_function(function,'4.4.0','WP_Http');
@set_time_limit( 60 );
if($red>5)return false…………………。
change@set_time_limit(1260);
这对我来说是有效的