<?php
error_reporting(0);
require_once ("config.php");
header('Content-Type: text/html; charset=gb2312');
$qq = $_GET['qq'];
if($qq == ''){
echo "<script> alert('不输入QQ你查什么!');parent.location.href='cxsq.php'; </script>";
}
$s = mysql_fetch_array(mysql_query("SELECT * FROM `shouquan` WHERE `qq` LIKE '$qq' LIMIT 0, 30 "));
$sj = $s['sj'];
$Date_1 = date("Y-m-d H:i:s"); 
$Date_2 = $sj;
$xzsj = strtotime($Date_1); 
$sqsj = strtotime($Date_2); if($sqsj > $xzsj){
$tishi='查询结果:已授权';
echo "<script> alert('$tishi');parent.location.href='cxsq.php'; </script>";
}
else{$tishi='查询结果:未授权';
echo "<script> alert('$tishi');parent.location.href='cxsq.php'; </script>";}
?>arent.location.href='cxsq.php'; </script>";}
?>

解决方案 »

  1.   

    把 alert('$tishi') 去掉就不弹了
      

  2.   


    <?php 
    header("refresh:30;url=enter.php");
    print('正在处理,请稍等...<br>30秒后自动跳转。');
    exit();?>
      

  3.   

    改成这样,删除alert ,然后把信息用url参数传过去就可以了。然后在cxsq.php中,使用$msg=$_GET['msg']; 获取信息显示。<?php
    error_reporting(0);
    require_once ("config.php");
    header('Content-Type: text/html; charset=gb2312');
    $qq = $_GET['qq'];
    if($qq == ''){
    echo "<script>parent.location.href='cxsq.php?msg=不输入QQ你查什么!'; </script>";
    }
    $s = mysql_fetch_array(mysql_query("SELECT * FROM `shouquan` WHERE `qq` LIKE '$qq' LIMIT 0, 30 "));
    $sj = $s['sj'];
    $Date_1 = date("Y-m-d H:i:s"); 
    $Date_2 = $sj;
    $xzsj = strtotime($Date_1); 
    $sqsj = strtotime($Date_2); 
     
    if($sqsj > $xzsj){
    $tishi='查询结果:已授权';
    echo "<script>parent.location.href='cxsq.php?msg=".$tishi."'; </script>";
            }
    else{
     
    $tishi='查询结果:未授权';
    echo "<script>parent.location.href='cxsq.php?msg=".$tishi."'; </script>";
     
    }
    ?><script>parent.location.href='cxsq.php'; </script>";
     
    }
    ?>