php获取地址栏参数有关问题

WBOY
Release: 2016-06-13 13:48:36
Original
1212 people have browsed it

php获取地址栏参数问题
http://www.xxx.com/plus/play.php?aid=24388&play=1
用php获取url地址并检测当play=1时play=1+1即play=2不知是否可以实现?
以下为链接调用列表:
    $list = explode('{span}',$palylist[$i]);
  if(empty($list[0])) continue ;
  if(empty($list[1])) continue ;
  $playid = $i+1;
  ?>
  >
echo $list[0]?>

    }?>

表达方式不是很好,认真看看应该知道是什么意思,见谅!

------解决方案--------------------
在页面最顶部写:
$play=$_GET['play'];
if($play==1) $play=$play+1;
?>
------解决方案--------------------
楼主的意思是不是 
地址 :www.xxx.com/plus/view.php?aid=24388&play=2
显示的内容是“www.xxx.com/plus/view.php?aid=24388&play=1”
也就是 www.xxx.com/plus/view.php?aid=24388&play=1 地址栏应该显示 
www.xxx.com/plus/view.php?aid=24388&play=2
 
------解决方案--------------------
发现楼主把一个简单的问题说得好复杂..按你自己11楼的说法来的话:
$play=$_GET['play']; 
if($play==1) $play=$play+1; 
?> 
就是核心..最多加几个IF

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template