使用WordPress时出现 wp_remote_get() 错误的解决方法

使用WordPress时出现 wp_remote_get() 函数或wp_remote_post()来获取所需的URL。

请将此代码可以放在模版文件的任何位置即可

<?php    
$response = wp_remote_get( 'http://foo.com/file.txt' );   
if( is_wp_error( $response ) ) {   
   echo 'Something went wrong!';   
} else {   
   echo 'Response:<pre>';   
   print_r( $response );   
   echo '</pre>';   
};    
?>   

給TA打賞
共{{data.count}}人
人已打賞
WordPress

Member Access Settings 的設置

2016-10-13 1:23:09

WordPress

WooCommerce "Invalid Address" issue during checkout 錯誤的解決方法

2016-11-17 18:41:19

0 Reply AAuthor MManager
    暫無討論,說說你的看法吧
個人中心
購物車
優惠劵
今日簽到
有新私信 私信列表
搜索