2011-11-27 3 views
1

웹 사이트가 있습니다 ... 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에 사용하고있는 코드입니다. 당신은 서버되지 않은 URL에 경로를 사용할 필요가

$library = 'mikerader.com/ZendFramework/library/'; 

: (하지 실제 암호)

// 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(); 
} 

답변

3

은 여기 버그입니다. 뭔가 같이 :

$library = $_SERVER['DOCUMENT_ROOT'] . '/path/to/zend/library'; 

또는 제공 당신이 바로 그 권한이 절대 경로가 너무 일 것이다 : 그들은 '때 또한

// or wherever it is 
$library = '/home/content/92/5336292/html/imaspy/library/Zend'; 

을, 당신은 왜 그렇게 데시벨 어댑터 객체를 설정하는 둘 다 똑같습니까?

+0

수업 시간에 어리석은 행동이었습니다. 그냥 살리기 위해 편집 중입니다. 나는 당신의 해결책을 시험하고 바로 돌아올 것입니다. –

+0

오, 알았어. 그들은 실제로 학교에서 젠드 프레임 워크를 가르치고 있습니까? 내가 사용한 경로는 가설 적이라는 것을 명심하십시오. 올바른 경로를 다시 확인하고 사용하십시오. –

+0

예 완벽하게 작동했습니다 ... 감사합니다! 예, 우리가 사용하고있는 책은 Zend Framework를 사용하여 웹 사이트에서 사용자 계정을 설정하는 방법을 가르치는 것입니다. –

0

(php.ini)

include_path = zend 라이브러리 디렉토리에 대한 로컬 경로. 당신의 로컬 경로의 include_path

php_value로 당신의 젠드 라이브러리 디렉토리 :

당신은 아마 당신이 당신의 .htaccess 파일을 통해 그 일을 시도 할 수 있지만 php.ini 파일, 에 액세스 할 수 없습니다.