views:

74

answers:

1

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?

+1  A: 

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

Kevin Schroeder
Great thanks very much!
pharma_joe