“下载失败。”来自失败的download_url()
能否尝试在其中一个文件中运行此命令:
$url = "http://wordpress.org/wordpress-3.5.1-no-content.zip";
require_once(ABSPATH . "wp-admin/includes/file.php");
$file = download_url($url);
echo "<pre>";
var_dump($file);
echo "</pre>";
这将为您提供以下错误消息之一:
WP_Error(\'http_no_url\', __(\'Invalid URL Provided.\'));
WP_Error(\'http_no_file\', __(\'Could not create Temporary file.\'));
WP_Error( \'http_404\', trim( wp_remote_retrieve_response_message( $response ) ) );
WP_Error(\'http_request_failed\', __(\'A valid URL was not provided.\'));
WP_Error( \'http_request_failed\', __( \'User has blocked requests through HTTP.\' ) );
WP_Error( \'http_request_failed\', __( \'Destination directory for file streaming does not exist or is not writable.\' ) );