我有一个网站... imaspy.com ...我无法使用我上传到我的主机帐户的Zend Framework。在我的共享主机帐户上使用Zend-Framework时遇到问题
请到我的网站并尝试成为注册用户(您可以使用假信息)并查看我收到的错误。这里是错误:
Warning: require_once(Zend/Loader/Autoloader.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/92/5336292/html/imaspy/scripts/library.php on line 5
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader/Autoloader.php' (include_path='.:/usr/local/php5/lib/php:mikerader.com/ZendFramework/library') in /home/content/92/5336292/html/imaspy/scripts/library.php on line 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();
}
这对于班级来说是件愚蠢的事。我只是编辑它,使其生活。我要测试你的解决方案,马上回来。 –
噢,我明白了。他们实际上在你的学校教Zend Framework吗?请记住,我使用的路径是假设的,请确保您仔细检查并使用正确的路径。 –
是的,我的工作很完美......谢谢!是的,我们正在使用的这本书正在教导如何使用Zend Framework在网站上设置用户帐户。 –