phpcms v9取得所有栏目及模型中的内容链接
首页 >  Phpcms  > 2016年06月02日阅(972)评(0

注:转载自网络,部分功能需优化,可按照此思路操作。

QQ截图20160602211640.jpg

<?php  
    $conf['DB_USER'] = '数据库用户名';  
    $conf['DB_PWD'] = '数据库密码';  
    $conf['DB_NAME'] = '数据库名';  
    $conn = mysql_connect('localhost',$conf['DB_USER'],$conf['DB_PWD']);  
    if (!$conn) {  
        echo '数据库连接错误!';  
    }  
    mysql_set_charset('utf8', $conn);        //set charset  
    mysql_select_db($conf['DB_NAME']);       //select datebase     
    $sql2 = 'select catid,catname from 表前缀_category';  
    $cat = mysql_query($sql2);  
    while ($catrow=mysql_fetch_array($cat)) {  
        echo $catrow['catname'].'</br>';  
        $sql = '(select title,url from 表前缀_news where catid='.$catrow["catid"].' order by id desc)   
         UNION (select title,url from 表前缀_picture where catid='.$catrow["catid"].' order by id desc)';  
        $result = mysql_query($sql);  
        while ($row=mysql_fetch_array($result)) {     
            echo $row['url']."</br>";           
        }  
    }  
?>
width:100%缩小窗口时背景图片出现空白bug
phpcms v9自定义文章内容页别名(url)

有朋自远方来...评论一下呗O(∩_∩)O哈哈~

QQ
昵称*
邮箱*
主页