1.数据库表设计
id int(6) not null auto_increment primary key
name varchar(20) not null ,
pid int(6),
sort int (6)
2.php代码如下:
|
3.在你需要分类的文件内载入类category,并引用静态方法
|
以下代码是返回一个一维数组的无限分类
楼主可以根据本人所提供的代码根据自己的需求修改
本文共 667 字,大约阅读时间需要 2 分钟。
1.数据库表设计
id int(6) not null auto_increment primary key
name varchar(20) not null ,
pid int(6),
sort int (6)
2.php代码如下:
|
3.在你需要分类的文件内载入类category,并引用静态方法
|
以下代码是返回一个一维数组的无限分类
楼主可以根据本人所提供的代码根据自己的需求修改
转载于:https://my.oschina.net/u/588516/blog/736543