教义中一串密不可分的 require_once 依赖关系
我正在尝试使用 Doctrine 的 pear 安装,似乎所有的 Requires 和类名都只是在错误的位置查找...我是否需要在 cli-config.php (或类似文件)中更新这一切?我不明白如何解决所有这些问题。
在对所有需求进行硬编码之前,我假设有一种优雅的方法可以使其发挥作用。例如...
在以下位置找不到“Doctrine\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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试运行 php
,如果这有效,您可能会在 include_path 中丢失该路径
尝试发出 phpinfo() 或 var_dump(ini_get('include_path')) 来实际查看您的包含路径,目录 Doctrine 应该位于其中的某个位置小路
try running php like
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