Home >Backend Development >PHP Tutorial > 一个白痴有关问题,怎么传递数字到下一个页面

一个白痴有关问题,怎么传递数字到下一个页面

WBOY
WBOYOriginal
2016-06-13 13:39:09729browse

一个白痴问题,如何传递数字到下一个页面
第一个页面:1
(传递number = 1过去)
第二个页面:staff.php
$performern = isset($_REQUEST['number'])?$_REQUEST['number']:'1';

$performern = $performern+2;
却发现$performern 始终=2;不能像数字那样加减,
我怀疑传递过来的是字母'1',而不是数字1,我的猜想对吗?假如是对的,怎么样才能传递数字过来?


------解决方案--------------------
$performern = intval($_GET['number']);
------解决方案--------------------
var_dump($_REQUEST);看看真的传过来了?

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