Home Backend Development PHP Tutorial discuz是怎么把数据表转成数组的

discuz是怎么把数据表转成数组的

Jun 13, 2016 pm 12:06 PM
array discuz gt nbsp

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 />)
Copy after login

------解决思路----------------------
一个while循环取出的资源就自己组织成数组啊
你看看\source\class\discuz\discuz_database.php,fetch_all()方法

我都是从入口文件开始找,用file_put_content()来输出我想要的数据
你可以用NetBeans,只要引入discuz,你就可以用control+鼠标左键,自动跳到定义该方法的文件中

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Discuz background login problem solution revealed Discuz background login problem solution revealed Mar 03, 2024 am 08:57 AM

Discuz background login problem solution revealed

What is Discuz? Definition and function introduction of Discuz What is Discuz? Definition and function introduction of Discuz Mar 03, 2024 am 10:33 AM

What is Discuz? Definition and function introduction of Discuz

A must-have for Discuz users! Comprehensive analysis of renaming props! A must-have for Discuz users! Comprehensive analysis of renaming props! Mar 12, 2024 pm 10:15 PM

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

Detailed explanation of Discuz registration process: allowing you to easily modify personal information Detailed explanation of Discuz registration process: allowing you to easily modify personal information Mar 13, 2024 pm 12:21 PM

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! What should I do if I encounter an incorrect Discuz password? Quick solution sharing! Mar 03, 2024 am 09:33 AM

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

Discuz domain name modification operation guide Discuz domain name modification operation guide Mar 09, 2024 pm 04:36 PM

Discuz domain name modification operation guide

Discuz background login failed? Teach you how to solve it easily! Discuz background login failed? Teach you how to solve it easily! Mar 02, 2024 pm 06:03 PM

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

Discuz Editor: an efficient post layout tool Discuz Editor: an efficient post layout tool Mar 10, 2024 am 09:42 AM

Discuz Editor: an efficient post layout tool

See all articles