小编use*_*417的帖子

用guzzle 6发送(POST)xml的正确方法

我想用guzzle发送一个xml文件来执行帖子.我没有找到一个例子.

到目前为止我所做的是:

$xml2=simplexml_load_string($xml) or die("Error: Cannot create object");
use    GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;
$client = new Client();
//
$request = new Request('POST', $uri, [ 'body'=>$xml]);
$response = $client->send($request);
 //
//$code = $response->getStatusCode(); // 200
//$reason = $response->getReasonPhrase(); // OK
 //
 echo $response->getBody();
Run Code Online (Sandbox Code Playgroud)

无论我尝试什么,我都会收到错误-1,这意味着xml无效.我发送的XML通过在线验证,有效%100

请帮忙.

php xml guzzle guzzle6

14
推荐指数
2
解决办法
2万
查看次数

Bootstrap文本输入高度

我正在尝试增加我正在编程的网站上的表单内的文本输入高度.我试图覆盖20px高度的默认bootstrap css,但似乎没有任何变化.这是我的代码 -

CSS

.inputfield
 {  
 position:relative;  
 top:30px;  
 font-size: 60px!important; 
 font-family:'Lato', sans-serif !important;
 font-weight: 400;
 color:white ; 
 width:400px;  
 line-height: 100px!important;  
 opacity:0.2; 
 }
Run Code Online (Sandbox Code Playgroud)

表格HTML

  <form  class="text-center" action="" method="post">
  <div class="row">
 <input type="text" id="username" name="name" class="inputfield" placeholder="Username"><br><br>
 </div>
 <input id="password" type="password" name="password" class="inputfield" placeholder="Password"><br><br>
 <br>
 <input type="submit" id="submit" value="Login" /><br>
 </form>
Run Code Online (Sandbox Code Playgroud)

请帮忙

html5 css3 twitter-bootstrap-3

3
推荐指数
1
解决办法
3万
查看次数

标签 统计

css3 ×1

guzzle ×1

guzzle6 ×1

html5 ×1

php ×1

twitter-bootstrap-3 ×1

xml ×1