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

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

问题描述

我一直在试图安装的Zend做为Gdata。我从开发环境运行,所以有机会为php.ini。

我已经设置了包括道路,当我运行验证脚本我得到以下..

冉PHP安装检查上2011-04-28T02:25:20 + 00:00
PHP扩展测试错误
没有发现错误
Zend Framework安装错误测试
没有发现错误
SSL功能测试错误
没有发现错误
YouTube的API连接错误测试
没有发现错误

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

 警告:require_once(的Zend / Loader.php):未能打开流:没有这样的文件或目录在/ usr / lib中/ PHP / ZendGdata /演示/的Zend /做为Gdata /博客.PHP在线37

致命错误:require_once():失败需要开放'的Zend / Loader.php'(include_path中=':/ usr / lib目录/ PHP的')在/ usr / lib中/ PHP / ZendGdata /演示/的Zend /做为Gdata /在线37 blogger.php

最合乎逻辑的结论是,与包括路径的问题,但我已经检查它,它似乎是正确的。

下面是我有这...

 :/ usr / lib目录/ PHP / ZendGdata /图书馆/ Zend的:/ usr / lib目录/ PHP / ZendGdata /库/

任何建议将是极大的AP preciated。


解决方案

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

如果您不知道服务器的根路径,使用相对路径来访问库。它的pretty得心应手。

以上两行应该在任何文件{1页,第二页,第三页}有文件夹结构的顶部写为下面


  • 网站

    • page1.php中

    • page2.php中将

    • Page3.php

    • ZendGdata

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

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..

Ran PHP Installation Checker on 2011-04-28T02:25:20+00:00 PHP Extension Errors Tested No errors found Zend Framework Installation Errors Tested No errors found SSL Capabilities Errors Tested No errors found YouTube API Connectivity Errors Tested No errors found

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

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

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/

Any suggestions would be greatly appreciated.

解决方案

$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.

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

  • Website
    • Page1.php
    • Page2.php
    • Page3.php
    • ZendGdata

You can use your relative path as per your need

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

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