2012-08-06 51 views
0

domain.com中創建子域後,我上傳了我的項目zend.domain.com。所以最初我的代碼是在domain.com/zend。 當我嘗試運行它給我這些錯誤的項目:上傳到子域時出現Zend Framework錯誤

Warning: include_once(Zend/View.php) [function.include-once]: failed to open stream: No such file or directory in /home/domain/public_html/zend/library/Zend/Loader.php on line 146

Warning: include_once() [function.include]: Failed opening 'Zend/View.php' for inclusion (include_path='/home/domain/public_html/zend/application/../library:/home/domain/public_html/zend/library:.:/usr/lib/php:/usr/local/lib/php') in /home/brainbud/public_html/zend/library/Zend/Loader.php on line 146

Fatal error: Class 'Zend_View' not found in /home/brainbud/public_html/zend/library/Zend/Application/Resource/View.php on line 69

這裏是我的.htaccess

Options +FollowSymLinks 
RewriteEngine on 
RewriteRule ^\.htaccess$ - [F] 

RewriteRule ^(blog|forum)($|/) - [L] 

RewriteCond %{REQUEST_URI} ="" 
RewriteRule ^.*$ /public/index.php [NC,L] 

RewriteCond %{REQUEST_URI} !^/public/.*$ 
RewriteRule ^(.*)$ /public/$1 

RewriteCond %{REQUEST_FILENAME} -f 
RewriteRule ^.*$ - [NC,L] 

RewriteRule ^public/.*$ /public/index.php [NC,L] 

回答

1

這有什麼,與你的.htaccess文件。您在上傳文件時錯過了一些庫部件,或者庫/ Zend在包含路徑中不正確。

  • 重新上傳的Zend
  • 檢查的index.php的正確路徑。 (這是什麼ls /home/domain/public_html/zend/library告訴你嗎?)

一般:

// Define path to application directory 
defined('APPLICATION_PATH') 
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application')); 

// Ensure library/ is on include_path 
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../library'), 
    get_include_path(), 
)));