2011-11-27 4 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'; 

、彼らは「とき、なぜあなたがそのようなデシベルアダプタオブジェクトを設定していますどちらも同じですか?あなたのphp.iniで

+0

授業では馬鹿だった。私はそれを生き生きとさせるために編集しています。私はあなたのソリューションを試して、すぐに戻ってくるつもりです。 –

+0

ああ、私は理解しています。彼らは実際に学校でZend Frameworkを教えていますか?私が使用したパスは仮説です。正しいパスを再確認して使用してください。 –

+0

はい、私は完璧に働いています...ありがとう!はい、私たちが使っている本は、Zend Frameworkを使ってウェブサイト上のユーザアカウントを設定する方法を教えています。 –

0

のinclude_path =あなたのZendのライブラリディレクトリへのあなたのローカルパス。あなたのローカルパスのinclude_path

はphp_valueをごZendのライブラリディレクトリに:

は、あなたはおそらく、あなたの.htaccessファイルを通してそれをやって試すことができますしかしphp.iniの、 へのアクセスを持っていません。

関連する問題