大家帮我看看我这个PHP搜索程序哪些地方又有错误了!!
演示地址如下:http://aiya.jx828.net/sous.htmhttp://free3.e-168.cn/aiyatx/sous.htm
目的是想按关键字搜索
后台程序代码如下:
PHP代码
<?php
$yoururl=""
if($xm=="gc"){
echo "<meta http-equiv=\"refresh\" content=\"0; url=http://music.yisou.com/lyric.html?pid=82676_1006&p=".$keyword."&mimetype=all&source=yisou_music_result_topsearch\"> ";
exit();}
if($xm=="wy"){
echo "<meta http-equiv=\"refresh\" content=\"0; url=http://www.yisou.com/search?p=".$keyword."&pid=82676_1006&needbid=&source=3721_union\"> "
;exit();}
if($xm=="gq"){
echo "<meta http-equiv=\"refresh\" content=\"0; url=mtv/search.php?keyword=".$keyword."\"> ";
exit();}
if($xm=="bdwy"){
echo "<meta http-equiv=\"refresh\" content=\"0; url=http://www.baidu.com/s?tn=aiyat&ct=&lm=&z=&rn=&word=".$keyword."&_sv=1&_si.x=19&_si.y=13\"> ";
exit();
}
?> $xm 换成 $_REQUEST['xm']
还有那个$keyword也换 下面是引用stock于2005-10-07 16:17发表的:
$xm 换成 $_REQUEST['xm']
还有那个$keyword也换
换了,还是不行啊!! 这样写才对!
注意编码规范哦
<?php
$keyword = $_POST['keyword'];
$xm = $_POST['xm'];
if ($xm == "gc") {
echo "<meta http-equiv=\"refresh\" content=\"0; url=http://music.yisou.com/lyric.html?pid=82676_1006&p=".$keyword."&mimetype=all&source=yisou_music_result_topsearch\"> ";
exit;
}
if ($xm == "wy") {
echo "<meta http-equiv=\"refresh\" content=\"0; url=http://www.yisou.com/search?p=".$keyword."&pid=82676_1006&needbid=&source=3721_union\"> ";
exit;
}
if ($xm == "gq") {
echo "<meta http-equiv=\"refresh\" content=\"0; url=mtv/search.php?keyword=".$keyword."\"> ";
exit;
}
if ($xm == "bdwy") {
echo "<meta http-equiv=\"refresh\" content=\"0; url=http://www.baidu.com/s?tn=aiyat&ct=&lm=&z=&rn=&word=".$keyword."&_sv=1&_si.x=19&_si.y=13\"> ";
exit;
}
?>
$yoururl="" 后面没有分号
$yoururl="" ;
这种错误也犯,真服了你 下面是引用stock于2005-10-07 19:53发表的:
$yoururl="" 后面没有分号
$yoururl="" ;
这种错误也犯,真服了你
哎,我怎么没看清呢!!但它错误却是说"Parse error: parse error in e:\freehost\2005\aiya\web\sous.php on line 3"
蛮郁闷的!
还有,十分感谢vayva 的指正,已经搞定了!!
大家帮我看看我这个PHP搜索程序哪些地方又有错误了!!
演示地址如下:http://aiya.jx828.net/sous.htmhttp://free3.e-168.cn/aiyatx/sous.htm
目的是想按关键字搜索
后台程序代码如下:
PHP代码
<?php
$yoururl=""
if($xm=="gc"){
echo "<meta http-equiv=\"refresh\" content=\"0; url=http://music.yisou.com/lyric.html?pid=82676_1006&p=".$keyword."&mimetype=all&source=yisou_music_result_topsearch\"> ";
exit();}
if($xm=="wy"){
echo "<meta http-equiv=\"refresh\" content=\"0; url=http://www.yisou.com/search?p=".$keyword."&pid=82676_1006&needbid=&source=3721_union\"> "
;exit();}
if($xm=="gq"){
echo "<meta http-equiv=\"refresh\" content=\"0; url=mtv/search.php?keyword=".$keyword."\"> ";
exit();}
if($xm=="bdwy"){
echo "<meta http-equiv=\"refresh\" content=\"0; url=http://www.baidu.com/s?tn=aiyat&ct=&lm=&z=&rn=&word=".$keyword."&_sv=1&_si.x=19&_si.y=13\"> ";
exit();
}
?>
页:
[1]