Zend Gdata 包含路径问题 (Loader.php) [英] Zend Gdata include path issue (Loader.php)

查看:29
本文介绍了Zend Gdata 包含路径问题 (Loader.php)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试安装 Zend Gdata.我正在开发环境中运行,因此可以访问 php.ini.

I've been trying to install Zend Gdata. I'm running from a dev environment so have access to php.ini.

我已经设置了包含路径,当我运行验证脚本时,我得到以下内容..

I've set the include path and when I run the verification script I get the following..

在 2011-04-28T02:25:20+00:00 运行 PHP 安装检查器已测试 PHP 扩展错误未发现错误已测试 Zend 框架安装错误未发现错误已测试 SSL 功能错误未发现错误已测试 YouTube API 连接错误未发现错误

但是当我尝试运行任何演示文件时,我得到了流动错误...

But when I try to run any of the demo files I get the floowing error...

Warning: require_once(Zend/Loader.php): failed to open stream: No such file or directory in /usr/lib/php/ZendGdata/demos/Zend/Gdata/blogger.php on line 37

致命错误:require_once(): 在/usr/lib/php/ZendGdata/demos/Zend/Gdata/中打开所需的 'Zend/Loader.php' (include_path='.:/usr/lib/php') 失败blogger.php 第 37 行

Fatal error: require_once(): Failed opening required 'Zend/Loader.php' (include_path='.:/usr/lib/php') in /usr/lib/php/ZendGdata/demos/Zend/Gdata/blogger.php on line 37

最合乎逻辑的结论是include路径有问题,但是我查了一下,好像是对的.

The most logical conclusion is that there is a problem with the include path, but I have checked it and it seems right.

这就是我所拥有的......

Here's what I have for it...

.:/usr/lib/php/ZendGdata/library/Zend:/usr/lib/php/ZendGdata/library/

任何建议将不胜感激.

推荐答案

$clientLibraryPath = 'ZendGdata/library';
$oldPath = set_include_path(get_include_path() . PATH_SEPARATOR . $clientLibraryPath);

如果您不知道服务器的根路径,请使用相对路径访问库.使用起来非常方便.

if you do not know the root path of the server, use relative path for accessing library. Its pretty handy to use.

以上两行应写在文件夹结构如下的任何文件{page1,page2,page3}的顶部

above two lines should be written on the top of any file{page1,page2,page3} having folder structure as below

  • 网站
    • Page1.php
    • Page2.php
    • Page3.php
    • ZendGdata

    您可以根据需要使用相对路径

    You can use your relative path as per your need

    这篇关于Zend Gdata 包含路径问题 (Loader.php)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆