jsp怎么接受php传来的参数
这是php里
$url = http://localhost:8089/jsp.jsp;
$post_data = array(username => bob,key => 12345);
$ch = curl_init();
curl_setopt($ch, curlopt_url, $url);
curl_setopt($ch, curlopt_returntransfer, 1);
curl_setopt($ch, curlopt_post, 1);
curl_setopt($ch, curlopt_postfields, $post_data);
$output=curl_exec($ch);
curl_close($ch);
print_r($output);
然后jsp中应该怎么去接受php中$post_data
再然后怎么去显示出来?
跪求。。。。。。
------解决方案--------------------
表单提交,该怎么做就怎么做
------解决方案--------------------
这个和php无关啊,你可以用get http://xxxx/xx?a=1&b=2 或者post (你的例子),jsp该怎么拿怎么拿
------解决方案--------------------
你如果不在页面用php代码的话,直接用$_post或$_get接受echo就出来了,如果代码和页面分离就得用smarty,后台分配给页面。