本地和服务器全是APAche 测试成功 www.zlcg.cn 演示,不断更新中,遇到技术屏障
编辑中!稍等! 找到 e\class\connect.php 文件修改如下
网站根目录创建.htaccess文件
找到 function sys_ReturnBqTitleLink($r)函数
找到
elseif($class_r[$r[classid]][showdt]==2) { $titleurl=$public_r[newsurl]."e/action/ShowInfo.php?classid=$r[classid]&id=$r[id]"; return $titleurl; }
替换如下
elseif($class_r[$r[classid]][showdt]==2)
{ if($class_r[$r[classid]][tbname]=="zlktqtpj"){ $titleurl=$public_r[newsurl]."Supply/$r[classid]_$r[id].html"; }
elseif($class_r[$r[classid]][tbname]=="news"){ $titleurl=$public_r[newsurl]."news/$r[classid]_$r[id].html"; } elseif($class_r[$r[classid]][tbname]=="qgxx"){ $titleurl=$public_r[newsurl]."buy/$r[classid]_$r[id].html"; } else{ $titleurl=$public_r[newsurl]."e/action/ShowInfo.php?classid=$r[classid]&id=$r[id]"; }
return $titleurl; }
这里$class_r[$r[classid]][tbname]=="zlktqtpj") 后台--管理数据表--表名称 zlktqtpj我的表名称下面同是 .htaccess填写如下 RewriteRule ^Supply\/([0-9]+)_([0-9]+)\.html$ e/action/ShowInfo.php?classid=$1&id=$2 RewriteRule ^news\/([0-9]+)_([0-9]+)\.html$ e/action/ShowInfo.php?classid=$1&id=$2 RewriteRule ^buy\/([0-9]+)_([0-9]+)\.html$ e/action/ShowInfo.php?classid=$1&id=$2 上面是内容伪静态,具体规则不懂得大家百度下吧!
会员伪静态:
.htaccess添加如下 RewriteRule ^([0-9]+)\.html$ /e/space/?userid=$1 我的调用方法 在主页模版中调用会员 <?php
$newmember=$empire->query("select userid,company from phome_enewsmemberadd where company!='' order by userid desc limit 6");
while($r=$empire->fetch($newmember)){ ?> <LI><A title="<?=$r["company"];?>" href="http://www.zlcg.cn/<?=$r["userid"]?>.html" target=_blank><?=$r["company"];?></A> <? } ?>
|