【发布时间】:2011-11-27 20:54:54
【问题描述】:
我有一个网站...imaspy.com...我在使用已上传到我的主机帐户的 Zend 框架时遇到问题。
请访问我的网站并尝试成为注册用户(您可以使用虚假信息)并查看我收到的错误信息。这是错误:
警告:require_once(Zend/Loader/Autoloader.php) [function.require-once]:无法打开流:没有这样的文件或 /home/content/92/5336292/html/imaspy/scripts/library.php 中的目录 在第 5 行
致命错误:require_once() [function.require]:打开失败 需要'Zend/Loader/Autoloader.php' (include_path='.:/usr/local/php5/lib/php:mikerader.com/ZendFramework/library') 在 /home/content/92/5336292/html/imaspy/scripts/library.php 第 5 行
这是我用于 library.php 的代码。 (不是真实密码)
// Adjust the path to match the location of the library folder on your system
$library = 'mikerader.com/ZendFramework/library/';
set_include_path(get_include_path() . PATH_SEPARATOR . $library);
require_once('Zend/Loader/Autoloader.php');
try {
Zend_Loader_Autoloader::getInstance();
$write = array('host' => 'imaspy.db.5336292.hostedresource.com',
'username' => 'imaspy',
'password' => 'password123',
'dbname' => 'imaspy');
$read = array('host' => 'imaspy.db.5336292.hostedresource.com',
'username' => 'imaspy',
'password' => 'password123',
'dbname' => 'imaspy');
// Comment out the next two lines if using mysqli
// and remove the comments from the last two lines
$dbWrite = new Zend_Db_Adapter_Pdo_Mysql($write);
$dbRead = new Zend_Db_Adapter_Pdo_Mysql($read);
//$dbWrite = new Zend_Db_Adapter_Mysqli($write);
//$dbRead = new Zend_Db_Adapter_Mysqli($read);
} catch (Exception $e) {
echo $e->getMessage();
}
【问题讨论】:
标签: php mysql zend-framework