youtube api / Zend Gdata 的 include_once 错误

发布于 2024-12-06 05:56:17 字数 1539 浏览 0 评论 0原文

我正在使用 Zend Framework 版本 1.11.10,特别是 GDATA/YouTube 函数。

我的日志被

include_once(Zend\Gdata\Media\Extension\VideoQuery.php) failed to open stream: No such file or directory C:\Zend\ZendServer\share\ZendFramework\library\Zend\Loader.php 148
include_once(): Failed opening "Zend\Gdata\Media\Extension\VideoQuery.php" for inclusion (include_path=".;C:\Zend\ZendServer\share\ZendFramework\library") C:\Zend\ZendServer\share\ZendFramework\library\Zend\Loader.php 148
include_once(Zend\Gdata\Media\VideoQuery.php) failed to open stream: No such file or directory C:\Zend\ZendServer\share\ZendFramework\library\Zend\Loader.php 148
include_once() Failed opening "Zend\Gdata\Media\VideoQuery.php" for inclusion (include_path=".;C:\Zend\ZendServer\share\ZendFramework\library") C:\Zend\ZendServer\share\ZendFramework\library\Zend\Loader.php 148
include_once(Zend\Gdata\YouTube\Extension\VideoQuery.php) failed to open stream: No such file or directory C:\Zend\ZendServer\share\ZendFramework\library\Zend\Loader.php 148
include_once()  Failed opening "Zend\Gdata\YouTube\Extension\VideoQuery.php" for inclusion (include_path=".;C:\Zend\ZendServer\share\ZendFramework\library") C:\Zend\ZendServer\share\ZendFramework\library\Zend\Loader.php 148

单步执行代码,我在第 1046 行到达 gdata\app.php,它循环遍历所有 _registeredpackages,前 3 个是上面列出的,直到它进入正确的类 Zend_Gdata_YouTube。

所以我的问题是如何让上述消息不记录?似乎在尝试包含该文件之前会有一个自动防故障装置来验证该文件是否存在。

注意:我回去查看了我的日志,这些错误并不总是存在,即使使用 Zend 框架也是如此。我想知道我是否以某种方式导致了这种情况的发生。

I'm using Zend Framework ver 1.11.10, specifically the GDATA/YouTube functions.

My log is getting blasted with

include_once(Zend\Gdata\Media\Extension\VideoQuery.php) failed to open stream: No such file or directory C:\Zend\ZendServer\share\ZendFramework\library\Zend\Loader.php 148
include_once(): Failed opening "Zend\Gdata\Media\Extension\VideoQuery.php" for inclusion (include_path=".;C:\Zend\ZendServer\share\ZendFramework\library") C:\Zend\ZendServer\share\ZendFramework\library\Zend\Loader.php 148
include_once(Zend\Gdata\Media\VideoQuery.php) failed to open stream: No such file or directory C:\Zend\ZendServer\share\ZendFramework\library\Zend\Loader.php 148
include_once() Failed opening "Zend\Gdata\Media\VideoQuery.php" for inclusion (include_path=".;C:\Zend\ZendServer\share\ZendFramework\library") C:\Zend\ZendServer\share\ZendFramework\library\Zend\Loader.php 148
include_once(Zend\Gdata\YouTube\Extension\VideoQuery.php) failed to open stream: No such file or directory C:\Zend\ZendServer\share\ZendFramework\library\Zend\Loader.php 148
include_once()  Failed opening "Zend\Gdata\YouTube\Extension\VideoQuery.php" for inclusion (include_path=".;C:\Zend\ZendServer\share\ZendFramework\library") C:\Zend\ZendServer\share\ZendFramework\library\Zend\Loader.php 148

Stepping through the code, I get to gdata\app.php in line 1046 where its looping through all the _registeredpackages, the first 3 being the ones listed above until it gets to the right class Zend_Gdata_YouTube.

So my question is how can I get the above messaged to not log? Seems there would be a fail-safe to verify the file exists before it tries to include it.

Note: I went back and reviewed my logs and these errors haven't always been there, even when using the Zend framework. I'm wondering if I caused this to happen somehow.

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

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

发布评论

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

评论(1

沧笙踏歌 2024-12-13 05:56:17

我通过在 Zend_Gdata_YouTube 实例上调用 registerPackage('Zend_Gdata_YouTube'); 解决了这个问题。

$yt = new Zend_Gdata_YouTube();
$yt->registerPackage('Zend_Gdata_YouTube');

这只是将正确的包unshift_registeredpackages

现在,Zend_Loader 不会产生以下代码错误:

$yt->newVideoQuery();

I've solved it by calling registerPackage('Zend_Gdata_YouTube'); on Zend_Gdata_YouTube instance.

$yt = new Zend_Gdata_YouTube();
$yt->registerPackage('Zend_Gdata_YouTube');

This simply unshift the correct package to _registeredpackages.

Now the following code doesn't produce errors by Zend_Loader:

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