教义中一串密不可分的 require_once 依赖关系

发布于 2024-11-25 16:25:48 字数 516 浏览 1 评论 0原文

我正在尝试使用 Doctrine 的 pear 安装,似乎所有的 Requires 和类名都只是在错误的位置查找...我是否需要在 cli-config.php (或类似文件)中更新这一切?我不明白如何解决所有这些问题。

在对所有需求进行硬编码之前,我假设有一种优雅的方法可以使其发挥作用。例如...

在以下位置找不到“Doc​​trine\DBAL\Configuration”类 /usr/local/pear/share/pear/Doctrine/ORM/Configuration.php 第 41 行

所以我的 pear 安装路径是 /usr/local/pear 并且 pear 学说安装似乎是 /usr/local/pear/share/pear/Doctrine

我一直在阅读文档,它似乎可以在 cli 的沙箱中工作,但是,我对 PHP 并没有真正的现代理解。我一直在浏览文档,可能缺少一个非常简单的步骤,但我没有看到它。

I am trying to use a pear installation of Doctrine, it seems like all of the Requires and Class Names are just looking in the wrong places... do I need to be updating this all in cli-config.php (or similar file)? I don't understand how to get all of these things resolved.

before I go hard-coding all of the requires, I assume there is an elegant way to get this to work. for instance...

Class 'Doctrine\DBAL\Configuration' not found in
/usr/local/pear/share/pear/Doctrine/ORM/Configuration.php on line 41

so my pear install path is /usr/local/pear and the pear doctrine install seems to be /usr/local/pear/share/pear/Doctrine

I have been reading documents, and it seems to work in the sandbox from the cli, but, I don't really have a very modern understanding of PHP. I have been looking through the documentation, and there is probably a very simple step that I am missing, but I do not see it.

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

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

发布评论

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

评论(1

夏日落 2024-12-02 16:25:48

尝试运行 php

php -d include_path=/usr/local/pear/share/pear

,如果这有效,您可能会在 include_path 中丢失该路径

尝试发出 phpinfo() 或 var_dump(ini_get('include_path')) 来实际查看您的包含路径,目录 Doctrine 应该位于其中的某个位置小路

try running php like

php -d include_path=/usr/local/pear/share/pear

if this works, you may be missing that path in your include_path

try to issue a phpinfo() or var_dump(ini_get('include_path')) to actually see your include path, the directory Doctrine should be located somewhere inside that path

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