当前位置:Gxlcms > PHP教程 > 这个地址是如何来的

这个地址是如何来的

时间:2021-07-01 10:21:17 帮助过:20人阅读

这个地址是怎么来的
本帖最后由 lghyt3 于 2014-01-12 23:40:53 编辑

最近在弄discuz论坛,它的论坛入口页中没有一个是html标签,但是点击后却出现不现的版块,不知怎么弄的,先上个图示意一下,大家注意图中最上沿的地址栏的ID的变化

下面是它的代码,我看了一下,没有地址栏这种格式呢“http://127.0.0.1/bbs/forum.php?mod=forumdisplay&fid=38”尤其是这个问号,
代码如下:

/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: forum.php 33828 2013-08-20 02:29:32Z nemohou $
*/


define('APPTYPEID', 2);
define('CURSCRIPT', 'forum');


require './source/class/class_core.php';


require './source/function/function_forum.php';


$modarray = array('ajax','announcement','attachment','forumdisplay',
'group','image','index','medal','misc','modcp','notice','post','redirect',
'relatekw','relatethread','rss','topicadmin','trade','viewthread','tag','collection','guide'
);

$modcachelist = array(
'index' => 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';

?>

分享到: 更多


------解决方案--------------------
ajax的,异步调用
------解决方案--------------------
最后一句 require DISCUZ_ROOT.'./source/module/forum/forum_'.$mod.'.php';这个应该是视图html的地址所在

人气教程排行