类文档

WP_HTTP_Fsockopen

💡 云策文档标注

概述

WP_HTTP_Fsockopen 是一个已弃用的 HTTP 传输类,基于 fsockopen 实现。它仅用于向后兼容,开发者应直接使用 WP_HTTP API。

关键要点

  • WP_HTTP_Fsockopen 已弃用,不应在新代码中使用
  • 所有 HTTP 请求应通过 WP_HTTP::request() 方法处理
  • 该类继承自 WP_Http_Streams,仅用于保持旧代码兼容性

注意事项

  • 从 WordPress 3.7.0 版本开始弃用,建议迁移到 WP_HTTP API
  • 相关类 WP_Http_Streams 是核心 HTTP 传输类,使用 PHP Streams

📄 原文内容

Deprecated HTTP Transport method which used fsockopen.

Description

This class is not used, and is included for backward compatibility only.
All code should make use of WP_Http directly through its API.

See also

Source

class WP_HTTP_Fsockopen extends WP_Http_Streams {
	// For backward compatibility for users who are using the class directly.
}

Changelog

Version Description
3.7.0 Deprecated. Please use WP_HTTP::request() directly
2.7.0 Introduced.