调用代码如下:
<?php $sql=$empire->query("select * from phome_ecms_news where userid='$navinfor[userid]' and ismember=1 order by newstime asc limit 5"); while($r=$empire->fetch($sql)) { $titleurl=sys_ReturnBqTitleLink($r);//链接 ?> <li><a href="<?=$titleurl?>" target="_blank" title="<?=$r[title]?>" > <?=$r[title]?> </a></li> <?php } ?>
其中userid='$navinfor[userid]' 不显示。。。如果把userid='$navinfor[userid]'改成userid='1(会员ID号)' 那么前台就显示会员投稿的文章了。 请问 直接写userid='$navinfor[userid]' 为什么前台不显示呢?
解决方法:换成 userid='$userid'
|