如何传递参数?100分。着急。请大虾指点迷津 用echo $_GET["cp"];因为你php.ini中register_global=off否则就可以echo $cp了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 使用$_GET['id']来接收,$dd=$_GET["cp"]也可以改php.ini中的register_globals = On 不推荐这样做。。 不行,我的php.ini里面已经=on了,再index.htm中,这是一个导航条,不是一个表单,但是我在chanpin.php中用print $cp;也能够正确的显示出来,但是到了<html><?echo $cp;?></html>就显示为''了。代码:<?include ('header.ly.php');print $cp;//能够正确显示;if ($leibie=''){ print "leibie wei null"; echo '<html><head><title></title><meta http-equiv="refresh" content=1;url=keyi.php?leibie='.$leibie.'></head></html>'; exit;}?><html><body bgcolor="#FFFFFF" text="#000000"><center> <font color="#FF0000">华北汽车配件网=〉<? echo $leibie;?>//这里就不行了 </font><A href="addinfo.php?leibie=<? echo $leibie ?>" target=_self><font color="#000099">添加新门市</font></A><br> <? <?phpecho $cp;?><a href='a.php?cp=<?php echo "电灯电器";?>'>电灯电器</a> <?$bb="电灯电器";?><a href='a.php?cp=<?php echo $bb;?>'>电灯电器</a> rawurlencode将字串编码成 URL 专用格式。语法: string rawurldecode(string str);传回值: 字串函式种类: 编码处理 内容说明 本函式将字串编码成 URL 的字串专用格式,特殊的字元会转换成百分比符号后面加上二个十六位元数字的格式。例如,空格就会变成 %20。<?echo "<a href='chanpin.php?cp=".rawurlencode ('电灯电器')."'>";?> eclipse 可以配合xdebug远程调试么?! 请教D4P工具中如何将Button精确定位在Panel的某位置 php生成静态页面????? Apache安装时出现情况 求高手帮忙 求一个php4能用的ldap管理类 几率问题。 mysql版本的感慨 有人知道 一个网站的建设的文案如何写吗? 请问PHP怎样控制内存! php中怎样完全清空cookie php在windows 2000 专业版下的安装问题?求教各位大虾? 1,2,3,....n这样的一串数字,怎么将其存储到session中,然后又从session去出?其中n是动态的!
$dd=$_GET["cp"]
也可以改php.ini中的register_globals = On 不推荐这样做。。
再index.htm中,这是一个导航条,不是一个表单,但是我在chanpin.php中用
print $cp;也能够正确的显示出来,但是到了<html><?echo $cp;?></html>就显示为''了。
代码:
<?
include ('header.ly.php');
print $cp;//能够正确显示;
if ($leibie=''){
print "leibie wei null";
echo '<html><head><title></title><meta http-equiv="refresh" content=1;url=keyi.php?leibie='.$leibie.'></head></html>';
exit;}
?>
<html>
<body bgcolor="#FFFFFF" text="#000000"><center>
<font color="#FF0000">华北汽车配件网=〉<? echo $leibie;?>//这里就不行了 </font><A
href="addinfo.php?leibie=<? echo $leibie ?>"
target=_self><font color="#000099">添加新门市</font></A><br>
<?
echo $cp;
?>
<a href='a.php?cp=<?php echo "电灯电器";?>'>电灯电器</a>
<a href='a.php?cp=<?php echo $bb;?>'>电灯电器</a>
将字串编码成 URL 专用格式。语法: string rawurldecode(string str);传回值: 字串函式种类: 编码处理
内容说明
本函式将字串编码成 URL 的字串专用格式,特殊的字元会转换成百分比符号后面加上二个十六位元数字的格式。例如,空格就会变成 %20。
<?
echo "<a href='chanpin.php?cp=".rawurlencode ('电灯电器')."'>";
?>