开发者

How do I use the Zend Youtube API correctly?

开发者 https://www.devze.com 2022-12-29 23:30 出处:网络
I am trying to access the YouTube API with the Zend libraries that I have included like this (the full path to the Zend library is components/lib/Zend/Gdata.php):

I am trying to access the YouTube API with the Zend libraries that I have included like this (the full path to the Zend library is components/lib/Zend/Gdata.php):


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

I now try to use the framework thus:

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

However when running the script it returns:

   开发者_如何转开发 Fatal error: Class 'Zend_Gdata_YouTube' not found in E:\inetpub\students\fit3060\20712510\ass2\results.php  on line 48

I think I have not included the Zend library properly or declared the include path correctly?


Zend_GData doesn't directly include the YouTube component. You need to include it specifically or, better yet, use the Autoloader.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号