呵呵,估计是在你的程序写法上存在问题吧,或者程序里有些特殊的处理方式.
print 后 exit还是一样怪怪的么?

解决方案 »

  1.   

    $author = $forum['lastpost']['author']
    然后用$author做查询试试
      

  2.   

    可能是print了html代码,ie上看不出来?
      

  3.   

    我想是因为
    $forum['lastpost']['author']的值包含了连接的代码
    就是<a href ...........>这些
    你把内容靠过去直接用因为没包含<a href>这些所以就可以
    你后面说的直接print出来只个连接也说明了包含连接代码
    所以你要对$forum['lastpost']['author']作下处理, 把里面的连接部分的字符去掉
      

  4.   

    写法有问题,打印出sql语句试试
      

  5.   

    //print $forum['lastpost']['author'];    //出来是个'wei',//print $new_id;
    $dd="select nickname from  cdb_memberfields b,cdb_members a where a.username='$forum['lastpost']['author']' and b.uid=a.uid ";//不能查到!,但是把where a.username='wei'能够查到
     $result=mysql_query($dd);如果用print $forum['lastpost']['author']; 出来的'wei'字符串,是一个链接!如果用$author = $forum['lastpost']['author'],在用print $author 打印出来,还是个链接!!
      

  6.   

    但是话说回来,
    $dd="select nickname from  cdb_memberfields b,cdb_members a where a.username='$forum['lastpost']['author']' and b.uid=a.uid ;
     $result=mysql_query($dd);用 print $dd;出来的语句是查得出来的啊,比如
    select nickname from  cdb_memberfields b,cdb_members a where a.username='wei' and b.uid=a.uid    但是上面的wei字符串有链接的!!
      

  7.   

    $dd="select nickname from  cdb_memberfields b,cdb_members a where a.username='$forum['lastpost']['author']' and b.uid=a.uid ";//不能查到!,但是把where a.username='wei'能够查到
    --------------------------------
    这个你改成下面的试试
    $author=preg_replace("/<a.*?>(.+?)</a>/is","$1",$forum['lastpost']['author']);
    $dd="select nickname from  cdb_memberfields b,cdb_members a where a.username='$author' and b.uid=a.uid ";
      

  8.   

    早贴出代码不是早解决了?$dd = "select nickname from  cdb_memberfields b,cdb_members a where a.username='{$forum['lastpost']['author']}' and b.uid=a.uid ";

    $dd = "select nickname from  cdb_memberfields b,cdb_members a where a.username='".$forum['lastpost']['author']."' and b.uid=a.uid ";
      

  9.   

    不行啊,打印出来的还是老样子,有
    select nickname from  cdb_memberfields b,cdb_members a where a.username='wei' and b.uid=a.uid 但是查询不到,可是wei还是有链接的!!!555555555,惨了,这难关过不去了
      

  10.   

    $author=preg_replace("/<a.*?>(.+?)</a>/is","$1",$forum['lastpost']['author']);
    用这个报如下错
    Warning: preg_replace(): Unknown modifier 'a' in D:\Apache2\htdocs\Discuz4\upload\forumdata\templates\1_index.tpl.php on line 95
      

  11.   

    $author=preg_replace("/<a.*?>(.+?)<\/a>/is","$1",$forum['lastpost']['author']);