ZendGdata 框架路径设置错误

2021-12-29 00:00:00 php zend-framework gdata

您好,我正在使用 ZendGdata-1.12.5 框架在 youtube 上上传视频

Hello I am using ZendGdata-1.12.5 framework to upload a video on youtube

我在我的 php 代码中使用了以下内容

I used the following in my php code

$path = './ZendGdata-1.12.5/library/';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);

require_once('Zend/Loader.php');  

Zend_Loader::loadClass('Zend_Gdata');  
Zend_Loader::loadClass('Zend_Gdata_YouTube');  
Zend_Loader::loadClass('Zend_Gdata_AuthSub');  
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');  

但似乎没有任何效果!帮助 ?

but nothing seems to be working ! help ?

PHP 警告:require_once(Zend/Xml/Security.php):无法打开流:没有这样的文件或目录/var/www/youtube_upload_video/ZendGdata-1.12.5/library/Zend/Gdata/App/Base.php在线 30

PHP Warning: require_once(Zend/Xml/Security.php): failed to open stream: No such file or directory in /var/www/youtube_upload_video/ZendGdata-1.12.5/library/Zend/Gdata/App/Base.php on line 30

PHP 致命错误:require_once():需要打开失败'Zend/Xml/Security.php'(include_path='.:/usr/share/php:/usr/share/pear:./ZendGdata-1.12.5/library/')在/var/www/youtube_upload_video/ZendGdata-1.12.5/library/Zend/Gdata/App/Base.php在线 30

PHP Fatal error: require_once(): Failed opening required 'Zend/Xml/Security.php' (include_path='.:/usr/share/php:/usr/share/pear:./ZendGdata-1.12.5/library/') in /var/www/youtube_upload_video/ZendGdata-1.12.5/library/Zend/Gdata/App/Base.php on line 30

推荐答案

路径正确,问题是Zend Gdata库没有Zend/xml文件夹.这是一个包含 2 个文件的小文件夹.您需要做的就是:

The path is correct, the problem is that Zend Gdata library does not have the Zend/xml folder. It's a small folder with 2 files. All you need to do is following:

1) 前往:http://framework.zend.com/downloads/latest

2) 下载 1.12(或任何您的版本)最小包.

2) Download 1.12 (or whatever your version is) MINIMAL package.

3) 将其解压缩到您的硬盘上.

3) Extract it on your hard disk.

4) 将 /library/Zend/Xml 文件夹上传到您服务器的 /ZendGdata-1.12.5/library/ 文件夹,以便在您的 /ZendGdata-1.12.5/library/Zend 文件夹你有 Xml 文件夹.

4) Upload /library/Zend/Xml folder to your server's /ZendGdata-1.12.5/library/ folder so that in your /ZendGdata-1.12.5/library/Zend folder you have the Xml folder.

5) 就是这样.享受.

5) That's it. Enjoy.

相关文章