问题描述
您好,我正在使用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' (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(或任何版本)MINIMAL软件包.
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)就这样.享受.
这篇关于ZendGdata框架路径设置错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!