警告:require_once(Zend/Loader.php) [function.require-once]:无法打开流
我们的服务器上有一个健身房显示屏,现在客户要求我向其添加另一个屏幕。我是 php 和 Zend 的新手,因此非常感谢您的帮助。
我正在尝试设置一个子域(例如gymtest.group.com),以便我可以对其进行操作,它与工作域(gym.group.com)完全相同的代码,出现以下警告错误。
警告:require_once(Zend/Loader.php) [function.require-once]:无法打开流:/home/group/subdomains/gymtest/Lynfield/Screen_01/includes/configure.php 中没有此类文件或目录第131行
有人可以给我一些指导吗?如果需要,我可以为您提供更多信息。谢谢。
S:)
这是来自configure.php 更新的一些代码
switch($_SERVER['SERVER_NAME'])
{
case 'localhost':
// SERVER PATHS
define('DOC_ROOT_LYNFIELD_1', $_SERVER['DOCUMENT_ROOT'].'gymtest/lynfield/Screen_01/');
define('BASE_HREF_LYNFIELD_1', 'http://'.$_SERVER['SERVER_NAME'].'/gymtest/lynfield/Screen_01/');
break;
default:
// SERVER PATHS
define('DOC_ROOT_LYNFIELD_1', $_SERVER['DOCUMENT_ROOT'].'/lynfield/Screen_01/');
define('BASE_HREF_LYNFIELD_1', 'http://'.$_SERVER['SERVER_NAME'].'/lynfield/Screen_01/');
break;
}
switch($_SERVER['SERVER_NAME'])
{
case 'localhost':
break;
default:
require_once('Zend/Loader.php');
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_Calendar');
break;
}
- 我已经从开发人员那里得到了答案。
以防万一有人遇到同样的情况,配置实际上在 htaccess 文件中,所有工作屏幕都有这一行
php_value include_path“/home/group/subdomains/gym/screen3/ZendGdata/library”
除了不工作的屏幕,所以我在 htaccess 中添加了上面的行并使用了不同的屏幕编号,并且它工作了。
我仍然不太确定第一个工作站点是如何工作的,而林菲尔德的线路丢失了,但是屏幕对于原始站点来说工作得很好,所以如果有人能解释一下那就太好了?但现在这是我复制的屏幕的答案。
谢谢大家。 小号:)
We have a gym display screen working on our server, and now the client is asking me to add another screen to it. I'm new to php and Zend, so any help is appreciated.
I'm trying to set up a sub domain (eg. gymtest.group.com) so I can work on it, it is exact the same code with the working one (gym.group.com), the following warning error comes up.
Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in /home/group/subdomains/gymtest/Lynfield/Screen_01/includes/configure.php on line 131
Can anyone give me some direction on this please? I can give you more info if needed. Thank you.
S:)
here is some code from configure.php
switch($_SERVER['SERVER_NAME'])
{
case 'localhost':
// SERVER PATHS
define('DOC_ROOT_LYNFIELD_1', $_SERVER['DOCUMENT_ROOT'].'gymtest/lynfield/Screen_01/');
define('BASE_HREF_LYNFIELD_1', 'http://'.$_SERVER['SERVER_NAME'].'/gymtest/lynfield/Screen_01/');
break;
default:
// SERVER PATHS
define('DOC_ROOT_LYNFIELD_1', $_SERVER['DOCUMENT_ROOT'].'/lynfield/Screen_01/');
define('BASE_HREF_LYNFIELD_1', 'http://'.$_SERVER['SERVER_NAME'].'/lynfield/Screen_01/');
break;
}
switch($_SERVER['SERVER_NAME'])
{
case 'localhost':
break;
default:
require_once('Zend/Loader.php');
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_Calendar');
break;
}
Update- I've got the answer from a developer.
Just in case someone got into the same situation, the config was actually in the htaccess files, all the working screens has this line
php_value include_path "/home/group/subdomains/gym/screen3/ZendGdata/library"
except the not working screen, so I added the line above in htaccess with a different screen number, and it worked.
I'm still not so sure how the first working site works while the line is missing for lynfield, but the screen works perfectly fine for the original site, so it would be great if someone can explains it?? But for now here is the answer for my copied screen.
Thanks everyone.
S:)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 htaccess 文件中, php_value include_path "/home/group/subdomains/gym/screen3/ZendGdata/library" 修复了该问题。完整详细信息请参阅上面的更新。谢谢大家。
In htaccess file, php_value include_path "/home/group/subdomains/gym/screen3/ZendGdata/library" fixed the problem. Full details please see the update above. Thanks everyone.