我有一個網站... 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在網站上設置用戶帳戶。 –