I want to make GET request for some API and get data from it. How can I send get request,get data from JSON and handle that for data that I can input in my HTML? I cant find any tutorial or something, please give some code. For example I want to get data from this API: https://api.privatbank.ua/p24api/pubinfo?exchange&json&coursid=11
关注
码龄 粉丝数 原力等级 --
- 被采纳
- 被点赞
- 采纳率
已采纳
在yii2 app中发出GET请求
收起
- 写回答
- 好问题 0 提建议
- 关注问题
- 微信扫一扫点击复制链接分享
- 邀请回答
- 编辑 收藏 删除 结题
- 收藏 举报
1条回答 默认 最新
- 关注
码龄 粉丝数 原力等级 --
- 被采纳
- 被点赞
- 采纳率
doula4096 2016-11-01 02:05关注Please reference Yii2 Http Client https://github.com/yiisoft/yii2-httpclient
本回答被题主选为最佳回答 , 对您是否有帮助呢? 本回答被专家选为最佳回答 , 对您是否有帮助呢? 本回答被题主和专家选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏举报微信扫一扫点击复制链接分享评论按下Enter换行,Ctrl+Enter发表内容
报告相同问题?
提交
- 2021-01-15 16:04回答 2 已采纳 版本问题啊
- 2015-02-15 18:12回答 2 已采纳 Let me show you how i solve it for my application. A simple application structure i have construc
- 2016-06-28 05:55回答 1 已采纳 //user is "finished typing," do something function doneTyping () { data = \$TitleI
- 2021-05-30 14:41在本文中,我们将深入探讨如何使用Yii 2.0框架结合League的OAuth2-Server库来构建一个符合PHP联盟标准的OAuth2服务器接口。OAuth2是一种授权协议,它允许第三方应用在用户授权的情况下访问受保护的资源。在Yii 2.0中...
- 2017-02-16 21:23回答 2 已采纳 If you are using PHP version >5.4, use as per below changes Yii:$app->request->post('for
- 2016-08-09 14:06回答 2 已采纳 yii2 rest controller reacts on the "Accept" HTTP Header. If in this header is only "application/js
- 2012-02-07 09:22回答 1 已采纳 Pass it as follows: <?= CHtml::ajaxButton('Click', $this->createUrl('path/here', array('myp
- 2020-08-14 09:51在 `yii2-advanced-app-2.0.36.tgz` 中,`advanced` 目录是整个项目的根目录,包含了以下关键组件: 1. **结构**:项目分为两个独立的应用部分 - `frontend` 和 `backend`,分别对应前端用户界面和后端管理界面。每...
- 2015-09-27 15:26回答 3 已采纳 When the view button is clicked on the Manage Patients grid view, In that view page, I hope you ha
- 回答 2 已采纳 Yii does not allow the CHttpRequest object live past the parsing of the routes. And creating a ne
- 2017-02-16 10:09回答 2 已采纳 I agreed from mscdex the problem is on PHP side. After increasing upload_max_filesize from 2MB to
- 2020-12-23 15:42cs_copy_dn的博客 工作中在使用yii框架时经常用到判断请求方式,在这里整理一下yii1和yii2的判断方式。 Yii 1 //post 提交方式 $method = Yii::app()->request->isPostRequest; $method = Yii::app()->request->...
- 2020-10-16 04:22通过以上内容分析,我们可以看到在基于Yii框架的环境中,如何有效地封装和复用PHP中的HTTP请求代码,以达到简化开发和提升代码质量的目的。上述知识点是对给定文件标题、描述、标签以及部分内容进行的详细说明,展示...
- 2020-10-15 12:37在YII2中,Actions是控制器中用于处理用户请求的函数。它们是控制器类中的方法,用于响应用户的输入,比如点击一个链接或提交一个表单。 Action的作用主要体现在以下几个方面: 1. 重用代码:在控制器中定义的...
- 2020-08-14 09:50"yii-basic-app-2.0.36.tgz"是Yii2框架的基础应用模板的压缩包,版本号为2.0.36。这个压缩包是为了方便开发者快速启动一个新的Yii2项目而设计的,它包含了构建基本Web应用所需的所有核心组件和文件。 首先,让我们...
- 没有解决我的问题, 去提问