Home  >  Article  >  Backend Development  >  怎么把链接中带的字符串弄到PHP里

怎么把链接中带的字符串弄到PHP里

WBOY
WBOYOriginal
2016-06-13 13:27:49705browse

如何把链接中带的字符串弄到PHP里
如何把链接中带的字符串弄到PHP里呢?
比如链接是http://www.xxxxx.com.cn/goods.php?goods_id=183

程序入如下




问题如下:
语句value=183,当链接中的183变成其他数时,VALUE后面带的值也会随之变化。我知道ASP里是用request来实现,但是PHP里就不会了,请各位大师帮忙。

------解决方案--------------------
if (!empty($_GET['goods_id'])){
$value=intval($_GET['goods_id']);
}else{
$value='';
}
?>
type=hidden>
------解决方案--------------------

PHP code





------解决方案--------------------
探讨

ASP语句是


type=hidden>



请帮忙,谢谢
Statement:
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