PHP分页有关问题,求大神指导
程序员文章站
2022-06-15 20:57:34
...
PHP分页问题,求大神指导
$key = $_POST["key"];
if($key=="")
{
echo "请输入搜索条件";
return;
}
//取得页码
$page = @$_GET['page'];
//定义每页显示信息条数
$page_size = 10;
//当页码参数为空时,将页码设为1
if ($page == "")
{
$page = 1;
}
$wsdl="http://pica.chalwin.com/service/JsAccessWebService.asmx?wsdl";
$client = new SoapClient($wsdl);
$param = array('NodeId'=>'1','key'=>$key,'pageIndex'=>$page,'pageSize'=>$page_size);//传参
$ret = $client->NewsSearch($param);//执行获取新闻的方法
//print_r ($ret);
if(isset($ret)&&$ret)
{
foreach($ret->NewsSearchResult->InheritanceNews as $item)
{
echo "\n\n
$key = $_POST["key"];
if($key=="")
{
echo "请输入搜索条件";
return;
}
//取得页码
$page = @$_GET['page'];
//定义每页显示信息条数
$page_size = 10;
//当页码参数为空时,将页码设为1
if ($page == "")
{
$page = 1;
}
$wsdl="http://pica.chalwin.com/service/JsAccessWebService.asmx?wsdl";
$client = new SoapClient($wsdl);
$param = array('NodeId'=>'1','key'=>$key,'pageIndex'=>$page,'pageSize'=>$page_size);//传参
$ret = $client->NewsSearch($param);//执行获取新闻的方法
//print_r ($ret);
if(isset($ret)&&$ret)
{
foreach($ret->NewsSearchResult->InheritanceNews as $item)
{
echo "\n
$item->Title | \n";
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论