0

I'm using Elgg - open source social networking framework for one of my projects. I have to customize it a lot, the problem is I don't understand how its filesystem works!

The project is located in localhost/elgg folder.

Now, inside a browser, there are links to /register/index.php and /blog/index.php. But inside actual project directory (/elgg) on my server there are none named /register or /blog.

How is that even possible? How do I find the folders?

4

2 回答 2

1

扩展@emaillenin 的答案:Elgg 确实使用 URL 重写.. 大多数 elgg 页面浏览都是由在

<installdir>/engine/handlers/page_handler.php

它调用page_handler($handler, $page)函数,定义在

<installdir>/engine/lib/pagehandler.php

当然,您必须深入挖掘才能找到生成 register/index.php 内容的内容——开始寻找的一个地方是elgg_register_page_handler()调用。

例如博客索引通过in注册到elgg的系统elgg_register_page_handler('blog', 'blog_page_handler');

<installdir>/mod/blog/start.php

同一个文件还包含blog_page_handler()函数...

如果您正在开发插件,那么值得查看 Elgg 的PageHandler wiki 条目

于 2011-11-04T14:15:37.337 回答
0

我认为 Elgg 自己使用 URL 重写,将/register/index.php/blog/index.php重定向到系统中的不同文件。

检查 .htaccess 文件中是否有任何内容,否则 elgg 可能会在内部重定向页面。

于 2011-10-23T10:01:14.470 回答