DocBlox CodeIgniter 无法直接访问脚本

发布于 2024-12-26 10:17:30 字数 362 浏览 3 评论 0原文

我刚刚在运行 Apache 的 Windows 上安装了 DocBlox。

在 CodeIgniter 应用程序中,我已从脚本顶部删除了以下行,

if ( ! defined('BASEPATH')) exit('No direct script access allowed');

但是当我运行时,

docblox -f main.php -t docs

我收到错误消息

No direct script access allowed

有谁知道还有什么阻止它工作吗?

谢谢

I've just installed DocBlox on Windows running Apache.

In a CodeIgniter application I have removed the following line from the top of my script

if ( ! defined('BASEPATH')) exit('No direct script access allowed');

But when I run

docblox -f main.php -t docs

I get the error message

No direct script access allowed

Does anyone know what else is stopping this from working?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

绮烟 2025-01-02 10:17:30

简短版本
您可能有一个类不在 DocBlox 解析的源代码中,但在您的 include_path 中。尝试使用详细 (-v) 选项查找哪个文件导致此错误,并检查哪些类不在项目源代码中但正在被调用。

说明
DocBlox 不使用反射加载文件,因此不应执行给定的代码,除非在项目文件中找不到类,但可以使用 include_path 找到该类。

例如:

class A extends B
{
}

如果 DocBlox 未解析类 B,那么 DocBlox 将尝试在您的包含路径中找到它,以便可以收集其信息。在这种情况下,A 没有被执行,但 B 被执行。

Short version
You probably have a class that is not in the source that DocBlox parses but is in your include_path. Try to find which file causes this error using the verbose (-v) option and check which classes are not in your project's source but are being invoked.

Explanation
DocBlox does not load files using Reflection and should thus not execute the given code unless a class could not be found in the project files but could be found using the include_path.

For example:

class A extends B
{
}

if class B is not parsed by DocBlox then DocBlox will try to find it in your include path so that information can be gathered on it. In this case A is not executed but B is.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文