youtube api / Zend Gdata 的 include_once 错误
我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过在
Zend_Gdata_YouTube
实例上调用registerPackage('Zend_Gdata_YouTube');
解决了这个问题。这只是将正确的包
unshift
到_registeredpackages
。现在,
Zend_Loader
不会产生以下代码错误:I've solved it by calling
registerPackage('Zend_Gdata_YouTube');
onZend_Gdata_YouTube
instance.This simply
unshift
the correct package to_registeredpackages
.Now the following code doesn't produce errors by
Zend_Loader
: