2010-05-13 46 views
1

我试图访问与是,我已经这样了Zend库的YouTube API(完整路径到了Zend库组件/ lib中/的Zend/Gdata.php):如何正确使用Zend Youtube API?

 

    //Include Zend Gdata 
    set_include_path('components/lib'); 
    include("Zend/Gdata.php"); 

我现在就来试试运行它返回的脚本时

 
    //Access video data via Zend library 
    $yt = new Zend_Gdata_YouTube(); 

但是:

 
    Fatal error: Class 'Zend_Gdata_YouTube' not found in E:\inetpub\students\fit3060\20712510\ass2\results.php on line 48 

我觉得我没有将Zend库正确或declar使用这样的框架编辑正确的包含路径?

回答

1

Zend_GData不直接包含YouTube组件。您需要专门包含它,或者更好地使用Autoloader。

+0

非常感谢! – 2010-05-13 22:38:10