jjzjj

php - Stripe 400 错误 "Invalid Positive Integer"

我有一个真正的问题。我正在尝试为一个通过Stripe向人们收费的非营利组织建立一个捐赠页面。我尝试进行的每一次收费都会给我一个错误,内容如下:已解析的请求帖子正文{"card":"TOKENWASHERE","description":"Donationby()","amount":"0","currency":"usd"}响应正文:{"error":{"type":"invalid_request_error","message":"Invalidpositiveinteger","param":"amount"}}我认为我传递给Stripe的金额有问题(显然Stripe认为它收到的

php - 为什么 get_headers() 返回 400 Bad request,而 CLI curl 返回 200 OK?

这是网址:https://www.grammarly.com我正在尝试使用nativeget_headers()获取HTTPheader功能:$headers=get_headers('https://www.grammarly.com')结果是HTTP/1.1400BadRequestDate:Fri,27Apr201812:32:34GMTContent-Type:text/plain;charset=UTF-8Content-Length:52Connection:close但是,如果我用curl命令行工具做同样的事情,结果会不同:curl-sIhttps://www.gramm

php - 尝试登录时 Yii2 中的错误请求 (#400)

我在尝试登录系统时收到BadRequest(#400)错误。我在本地主机上工作。主要布局:language?>">charset;?>">title);?>head();?>查看(login.php):title='Login';$this->params['breadcrumbs'][]=$this->title;?>OpenXcellPvt.Ltd.SignintogetintouchLogin站点Controller:['class'=>AccessControl::className(),'rules'=>[['actions'=>['login','error'],'allo

php - Guzzle 检测到 400 或 500 错误时如何防止崩溃?

我正在使用PHPguzzle我试过了publicstaticfunctionget($url){$client=newClient();try{$res=$client->request('GET',$url);$result=(string)$res->getBody();$result=json_decode($result,true);return$result;}catch(GuzzleHttp\Exception\ClientException$e){$response=$e->getResponse();$responseBodyAsString=$response->ge

PHP 警告 : file_get_contents failed to open stream: HTTP request failed! HTTP/1.1 400 错误请求

我已经使用Codeigniter构建了一个本地DVD数据库,其中包含电影名称等。我想要做的是从thisIMDBAPI加载更多电影数据。.但是我收到以下错误:APHPErrorwasencounteredSeverity:WarningMessage:file_get_contents(http://www.imdbapi.com/?i=&t=2Fast2Furious)[function.file-get-contents]:failedtoopenstream:HTTPrequestfailed!HTTP/1.1400BadRequestFilename:controllers/dv

php - 无法打开流 : HTTP request failed! HTTP/1.0 400 错误请求

这是我用来查找地点的纬度和经度的代码:functioncoords($address){echo$url="http://maps.googleapis.com/maps/api/geocode/json?address=".$address;$json=file_get_contents(urlencode($url));$data=json_decode($json,TRUE);print_r($data['results'][0]['geometry']['location']['lat']);print_r($data['results'][0]['geometry']['lo

php - Yii2 自定义 url 管理。出现 400 错误

嗯,PHP时代。我的客户希望我使用Yii2作为他项目的框架。我已经启动并运行了。没问题。我通过composer使用了高级模板。将我的网站根目录设置为/frontend/web等现在,我想使用这种url格式website.com/messages/或website.com/messages/tom...等现在设置方式显示website.com/index.php?r=messages/index...我找到了这个文档...https://github.com/yiisoft/yii2/blob/master/docs/guide/url.md但我似乎无法弄清楚。这是我的步骤...我将我的

PHP curl 错误请求 400 - mapquest 地理编码

我的网址是:http://www.mapquestapi.com/geocoding/v1/batch?key=dNBvDLtTx85L3akdg8vBoHQXrWpDJSEI&location=HEBRON,KY,US&location=CINCINNATI,KY,US&location=CINCINNATI,KY,US&location=BEDFORDPARK,IL,US&location=BEDFORDPARK,IL,US&location=HODGKINS,IL,US&location=HODGKINS,IL,US&location=HODGKINS,IL,US&locatio

php - Laravel 5.1 - Facebook 通过 Socialite(客户端错误 : 400)

使用thistutorialonLaracast(Laravel5.0-Socialite),特别是在12.11之前,我已经成功设置了所有内容。但是,我使用的是Laravel5.1定义了我的路线,但目前注释掉了回调提供者,因为我只是想通过获取的token获取用户详细信息:Route::get('auth/facebook','Auth\AuthController@redirectToProvider');//Route::get('auth/facebook/aaa','Auth\AuthController@handleProviderCallback');在config>serv

php - 无法访问 URL : HTTP/1. 1 400 Bad URI

我想通过composer创建一个新的laravel项目,但我遇到了这个错误[Composer\Downloader\TransportException]The'http://packagist.org/p/fideloper/proxy%249271e19129358853986ed3ca9315ced11a42439a57f49537033c3b436a6ff543.json'URLcouldnotbeaccessed:HTTP/1.1400BadURI 最佳答案 这个问题经常被问到这里、github或其他地方。我几乎可以说这应