include/dedemodule.class.php
(开头部分) 21KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php if(!defined('DEDEINC')) exit("Request Error!");
/**
* 织梦模块类
*
* @version $Id: dedemodule.class.php 1 10:31 2010年7月6日Z tianya $
* @package DedeCMS.Libraries
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc.
* @license http://help.dedecms.com/usersguide/license.html
* @link http://www.dedecms.com
*/
require_once(DEDEINC.'/charset.func.php');
require_once(DEDEINC.'/dedeatt.class.php');
require_once(DEDEINC.'/dedehttpdown.class.php');
class DedeModule
{
var $modulesPath;
var $modulesUrl;
var $modules;
var $fileListNames;
var $sysLang;
var $moduleLang;
function __construct($modulespath='',$modulesUrl='')
{
global $cfg_soft_lang;
$this->sysLang = $this->moduleLang = $cfg_soft_lang;
$this->fileListNames = array();
$this->modulesPath = $modulespath;
$this->modulesUrl = $modulesUrl;
}
function DedeModule($modulespath='')
{
$this->__construct($modulespath);
}
/**
* 枚举系统里已经存在的模块(缓存功能实际上只作hash与文件名的解析,在此不特别处理)
*
* @access public
* @param string $moduletype 模块类型
* @return string
*/
function GetModuleList($moduletype='')
{
if(is_array($this->modules)) return $this->modules;
$dh = dir($this->modulesPath) or die("没找到模块目录:({$this->modulesPath})!");
$fp = @fopen($this->modulesPath.'/modulescache.php','w') or die('读取文件权限出错,目录文件'.$this->modulesPath.'/modulescache.php不可写!');
fwrite($fp, "<"."?php\r\n");
fwrite($fp, "global \$allmodules;\r\n");
while($filename = $dh->read())
{
if(preg_match("/\.xml$/i", $filename))
{
$minfos = $this->GetModuleInfo(str_replace('.xml','',$filename));
if(isset($minfos['moduletype']) && $moduletype!='' && $moduletype!=$minfos['moduletype'])
{
continue;
后面还有 596 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。