用php如何读取url中指定的参数 直接用echo $type;就可以了在参数名加个$,组成这个变量就可以了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 只有这种方法可以$_GET['type']获得的参数是什么类型的? php对类型检查不是很严格type.php<a href="type_get.php?type=1">test</a>type_get.php<?php$localtype=2;$typex=$_GET['type'];echo "$typex is the type:".gettype($typex)."<br>";echo "$localtype is the type:".gettype($localtype)."<br>";if(is_int("$type")){echo 'int';}else{echo "request arg is not int"."<br>";}if($typex==$localtype){echo "equals";}?> $type=$_GET['type']可以用(int)$type (string)$type强制转换 下面的这段PHP代码应该怎么改红字部分的变量才有值 Parse error: syntax error, unexpected T_DO, expecting ';' in 请教php高手!关于mongodb的应用问题! 构造函数的具体应用的问题??? 请问一个和firefox有关的问题 PHP转发的问题 向高手请教一下输入输出处理问题 为什么我的session值写不进去? 想学PHP,麻烦推荐一下使用什么环境,什么数据库? 简单的PHP分页程序 [源码] 有没有写得比较罗嗦的地方,请指教! 怎样进行目录的删除,添加和修改? 散88分。如何提取出里面的URL地址
获得的参数是什么类型的?
<a href="type_get.php?type=1">test</a>type_get.php
<?php
$localtype=2;
$typex=$_GET['type'];
echo "$typex is the type:".gettype($typex)."<br>";
echo "$localtype is the type:".gettype($localtype)."<br>";
if(is_int("$type")){
echo 'int';
}
else{
echo "request arg is not int"."<br>";
}
if($typex==$localtype){
echo "equals";
}
?>
可以用(int)$type (string)$type强制转换