0
我使用Laravel 5.2
和我刚创建简单的类,我创建Web请求接收JSON文件。更改&到&在php类
因此类的部分看起来像:
public function request(){
$request = 'https://example.com/someotherthings/var='.$value1.'&var2='.$value2';
}
对此我得到:
https://example.com/someotherthings/var=valueOfValue1&var2=valueOfValue2
的问题是,要求是错误的,我也没有得到回报响应。
您是否尝试过'urlencode'?这里你有文档:http://php.net/manual/es/function.urlencode.php – Mumpo