Discuz! Why can I upload the discuz.htm file? I recently studied discuz! But I cannot understand how he directly wrote the discuz.htm template after entering 127.0.0.1/forum.php. remember that this post must be justified. you cannot do anything about it. Otherwise, you will not be given a score. this is a lot of points. one hundred points
array('announcements', 'onlinelist', 'forumlinks','heats', 'historyposts', 'onlinerecord', 'userstats', 'diytemplatenameforum'),'forumdisplay'=> array('smilies', 'announcements_forum', 'globalstick', 'forums','onlinelist', 'forumstick', 'threadtable_info', 'threadtableids', 'stamps', 'diytemplatenameforum'),'viewthread'=> array('smilies', 'smileytypes', 'forums', 'usergroups','stamps', 'bbcodes', 'smilies','custominfo', 'groupicon', 'stamps','threadtableids', 'threadtable_info', 'posttable_info', 'diytemplatenameforum'),'redirect'=> array('threadtableids', 'threadtable_info', 'posttable_info'),'post'=> array('bbcodes_display', 'bbcodes', 'smileycodes', 'smilies', 'smileytypes','domainwhitelist', 'albumcategory'),'space'=> array('fields_required', 'fields_optional', 'custominfo'),'group'=> array('grouptype', 'diytemplatenamegroup'),);$mod = !in_array(C::app()->var['mod'], $modarray) ? 'index' : C::app()->var['mod'];define('CURMODULE', $mod);$cachelist = array();if(isset($modcachelist[CURMODULE])) {$cachelist = $modcachelist[CURMODULE];$cachelist[] = 'plugin';$cachelist[] = 'pluginlanguage_system';}if(C::app()->var['mod'] == 'group') {$_G['basescript'] = 'group';}C::app()->cachelist = $cachelist;C::app()->init();loadforum();set_rssauth();runhooks();$navtitle = str_replace('{bbname}', $_G['setting']['bbname'], $_G['setting']['seotitle']['forum']);$_G['setting']['threadhidethreshold'] = 1;require DISCUZ_ROOT.'./source/module/forum/forum_'.$mod.'.php';?>
Reply to discussion (solution)
In the above code, the variable discuz does not exist logically, so I am wondering why he can load it.
$ Mod =! In_array (C: app ()-> var ['mod'], $ modarray )? 'Index': C: app ()-> var ['mod'];
If there is no mod parameter, it means mod = index;
You can find forum_index.php in/source/module/forum.
This is the background file of the homepage.
At the end of the include template ('DIY: forum/discuz: '. $ gid );
Refer introduces discuz.html
The truth is, it cannot be dry.
$ Mod =! In_array (C: app ()-> var ['mod'], $ modarray )? 'Index': C: app ()-> var ['mod'];
If there is no mod parameter, it means mod = index;
You can find forum_index.php in/source/module/forum.
This is the background file of the homepage.
At the end of the include template ('DIY: forum/discuz: '. $ gid );
Refer introduces discuz.html
Well, what you said is clear. you can certainly get the score, but I still have a question. can you solve it? $ Mod =! In_array (C: app ()-> var ['mod'], $ modarray )? 'Index': C: app ()-> var ['mod']; "C: app ()" in the sentence () -> var ['mod'] "I don't understand. is the double colon a static method in the class? Or what? If it is a static method, how does the app () come from? I searched for the var array. didn't I find it? I understood it wrong. I must give it to you. lie to your puppy.
Class C: source/class/class_core.php. at the bottom of the file, it inherits the core class. in this file, C: creatapp () is called on the core class (); this static method uses discuz_application: instance ();
Discuz_application class: source/class/discuz/discuz_application.php. this class is the core class. it is called by all the entry files, which defines the $ var array, there is also a $ this-> var = & $ _ G;. I don't know $ _ G, so $ _ G ['mod'] can also get the mod parameter value.