本文整理汇总了PHP中Requests::set_certificate_path方法的典型用法代码示例。如果您正苦于以下问题:PHP Requests::set_certificate_path方法的具体用法?PHP Requests::set_certificate_path怎么用?PHP Requests::set_certificate_path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Requests
的用法示例。
在下文中一共展示了Requests::set_certificate_path方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
/**
* HTTP API: WP_Http class
*
* @package WordPress
* @subpackage HTTP
* @since 2.7.0
*/
if (!class_exists('Requests')) {
require ABSPATH . WPINC . '/class-requests.php';
Requests::register_autoloader();
Requests::set_certificate_path(ABSPATH . WPINC . '/certificates/ca-bundle.crt');
}
/**
* Core class used for managing HTTP transports and making HTTP requests.
*
* This class is used to consistently make outgoing HTTP requests easy for developers
* while still being compatible with the many PHP configurations under which
* WordPress runs.
*
* Debugging includes several actions, which pass different variables for debugging the HTTP API.
*
* @since 2.7.0
*/
class WP_Http
{
// Aliases for HTTP response codes.
const HTTP_CONTINUE = 100;
const SWITCHING_PROTOCOLS = 101;
const PROCESSING = 102;