libfile()函数是什么意思

lzawindows 2011-04-05 05:07:46
require_once libfile();


我们都知道require_once是包含文件并执行.

libfile()函数是什么意思!!!!!



谢谢!

在线等待!!!!!!!!!
...全文
1187 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
海之林 2011-09-19
  • 打赏
  • 举报
回复
discuz x2.0中的 source\function\function_core.php下的:

function libfile($libname, $folder = '') {
$libpath = DISCUZ_ROOT.'/source/'.$folder;
if(strstr($libname, '/')) {
list($pre, $name) = explode('/', $libname);
return realpath("{$libpath}/{$pre}/{$pre}_{$name}.php");
} else {
return realpath("{$libpath}/{$libname}.php");
}
}
yuxue123 2011-04-22
  • 打赏
  • 举报
回复
是为了方便调用写的函数。
前两天刚刚开了文库,有兴趣的同学们可以参考一下:)
http://dev.discuz.org/wiki
guojing916 2011-04-22
  • 打赏
  • 举报
回复
是discuz中的函数,用来加载指定路径的文件。PHP不会自带该函数
lzawindows 2011-04-07
  • 打赏
  • 举报
回复
这个是 discuz 里的函数,但在 discuz 却看不到 libfile()函数创建.
gwn1902 2011-04-07
  • 打赏
  • 举报
回复
晕 竟然不是红色字体 不好意思 我想标明红色字体的是这个方法_init_env();
gwn1902 2011-04-07
  • 打赏
  • 举报
回复
在discuz x1.5版本里面 只是在 source/class/class_core.php 文件里面的discuz_core 类被初始化的时候 的

function discuz_core() {
$this->_init_env();
$this->_init_config();
$this->_init_input();
$this->_init_output();
}

红色表明的方法里面调用到了 ./source/function/function_core.php 这个文件
而libfile方法 就是包含在这个文件里面
呵呵 看源码的时候 lz要仔细点哈
床上等您 2011-04-05
  • 打赏
  • 举报
回复
如果我没估错,这个是 discuz 里的函数。

载入 source 的文件。
kaifadi 2011-04-05
  • 打赏
  • 举报
回复
libfile()估计是个函数,然后内部最后有一个return 'PHP文件'
那么require_once libfile();其效果==require_once 'php文件名'
lazyboy_wu 2011-04-05
  • 打赏
  • 举报
回复
明显是别人封装好的,php不提供这样的函数。

从字面上看应该是从指定的路径中加载文件!

4,251

社区成员

发帖
与我相关
我的任务
社区描述
国内外优秀PHP框架讨论学习
社区管理员
  • Framework
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧