discuz是怎么把数据表转成数组的
Jun 13, 2016 pm 12:06 PM
discuz是如何把数据表转成数组的?
下面这组数据是频道栏目表中的,我的疑问是 discuz 如何把数据表中的数据转成数组的呢?
Array<br />(<br /> [0] => Array<br /> (<br /> [catname] => 频道栏目1<br /> )<br /><br /> [1] => Array<br /> (<br /> [catname] => 频道栏目2<br /> )<br /><br /> [2] => Array<br /> (<br /> [catname] => 频道栏目3<br /><br /> [3] => Array<br /> (<br /> [catname] => 频道栏目4<br /> )<br /><br /> [4] => Array<br /> (<br /> [catname] => 频道栏目5<br /> )<br /><br /> [5] => Array<br /> (<br /> [catname] => 频道栏目6<br /> )<br /> <br />)
------解决思路----------------------
一个while循环取出的资源就自己组织成数组啊
你看看\source\class\discuz\discuz_database.php,fetch_all()方法
我都是从入口文件开始找,用file_put_content()来输出我想要的数据
你可以用NetBeans,只要引入discuz,你就可以用control+鼠标左键,自动跳到定义该方法的文件中

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Discuz background login problem solution revealed

What is Discuz? Definition and function introduction of Discuz

A must-have for Discuz users! Comprehensive analysis of renaming props!

Detailed explanation of Discuz registration process: allowing you to easily modify personal information

What should I do if I encounter an incorrect Discuz password? Quick solution sharing!

Discuz domain name modification operation guide

Discuz background login failed? Teach you how to solve it easily!

Discuz Editor: an efficient post layout tool
