对不起,如果这是重复的,我会认为它会但是找不到任何东西
我有一个使用soap客户端网络服务的应用程序连接到其他服务器,但最近我发现长文本的请求不会发送到网络服务。
我认为它与某些PHP配置相关,并将post_max_size
设置为200M
并将max_input_vars
设置为10000
,但问题无法解决...
今天我发现file_get_contents
不能在我的服务器上运行肥皂客户端,我相信其中一个php配置会出现这个问题。
这里的代码不起作用,当我运行它只是等待一段时间并且什么都不显示(白页)
$网址=" HTTP://somedomain.com/webservice.php用户名=用户安培;密码= PASS&安培;挪威= 13218%5E04134414401%5E7015373%5E3%5E51 5E14%%252F2141-9305-310209- 424926%25D8%25A2%25D9%2585%25D9%2588%25D8%25B2%25D8%25B4%2B%25D9%2583%25D8%音孔25a7%25D8%25B1%25D8%25A8%25D8%25B1%25D8%25AF%25D9% 258A%2BHTML%2B5.0%2B%2526%2BCSS%2B3.0%2B%25D9%2587%25D9%2585%25D8%25B1%25D8%音孔25a7%25D9%2587%2B%25D8%25A8%25D8%音孔25a7% 2BResponsive%2BWeb%2BDesign%25D9%2585%25D8%25B1%25D8%25AC%25D8%25B9%2B%25D8%25A2%25D9%2585%25D9%2588%25D8%25B2%25D8%25B4%25D9%258A%2B% 25D8%25A8%25D8%25B1%25D9%2586%25D8%音孔25a7%25D9%2585%25D9%2587%25E2%2580%258℃%25D9%2586%25D9%2588%25D9%258A%25D8%25B3%25D9%258A% 2BASP.NET%2B4.5%2B%25D8%25AF%25D8%25B1%2BC%2523%2B%2528%25D8%音孔25a7%25D8%25B2%2B%25D9%2585%25D8%25A8%25D8%25AA%25D8% 25AF%25D9%258A%2B%25D8%25AA%25D8%音孔25a7%2B%25D9%25BE%25D9%258A%25D8%25B4%25D8%25B1%25D9%2581%25D8%25AA%25D9%2587%2529%25D9% 2585%25D8%25B1%25D8%25AC%25D8%25B9%2B%25D9%2583%25D8%音孔25a7%25D9%2585%25D9%2584%2BASP.Net%2BMVC%2B4%5E2825%5E81970 0%5E1%5E0%5E%25D8%音孔25a7%25D9%2585%25DB%258C%25D8%25B1%25D8%25B1%25D8%25B6%25D8%音孔25a7%2B%25D8%音孔25a7%25D8%25B3%25D8%25AF% 25D9%25BE%25D9%2588%25D8%25B1%5E%25D8%25AA%25D8%25A8%25D8%25B1%25DB%258C%25D8%25B2%2B-%2B%25Da朝%2586%25D9%2587%25D8%音孔25a7 %25D8%25B1%25D8%25B1%25D8%音孔25a7%25D9%2587%2B%25D9%2584%25D8%音孔25a7%25D9%2584%25D9%2587%2B%25D9%2585%25D8%25AC%25D8%25AA%25D9 %2585%25D8%25B9%2B%25D8%25AA%25D8%25AC%25D8%音孔25a7%25D8%25B1%25DB%258C%2B%25D9%2584%25D8%音孔25a7%25D9%2584%25D9%2587%2B%25D8 %25B7%25D8%25A8%25D9%2582%25D9%2587%2B%25D8%音孔25a7%25D9%2588%25D9%2584%2B%25D9%2588%25D8%音孔25a7%25D8%25AD%25D8%25AF%2B5%5E5178735466 %5Einfo%2540pendarepars.com%5E154000%5E12320&安培; Ordertip = 1&#34 ;;
echo file_get_contents($ url);
答案 0 :(得分:0)
您可以通过发布而不是获取
发送请求来避免此问题答案 1 :(得分:0)
您应该使用cUrl检查服务器正在响应的内容。这段代码可以帮助您。
// Prep cUrl
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$return = curl_exec($ch);
// Output info
echo "<pre>";
if(curl_error($ch))
{
echo "Error: ".curl_error($ch)."\n";
}
else
{
print_r(curl_getinfo($ch));
echo htmlentities($return);
}
查找http_code,如果是414则服务器无法处理URI的长度。