0

私はzendFrameworkに取り組んでおり、すでにzend Frameworkを使用してWebサイトを作成していますが、プロジェクトをリモートサーバーで実行したいと考えています。しかし、すべてのプロジェクトデータをリモートサーバーに転送すると、機能しません。

私のzendフレームワークはローカルホストでうまくプロジェクトします。

のマニュアルも読んだGetting Started with Zend Framework By Rob Allen, www.akrabat.com.

それで、このマニュアルを読んだ後、私はこの重要な記事を見つけました。

You must also ensure that Apache is configured to support .htaccess files. This is usually done by
changing the setting:
! AllowOverride None
to
! AllowOverride All
in your httpd.conf file. Check with your distribution’s documentation for exact details. You will not be able
to navigate to any page other than the home page in this tutorial if you have not configured mod_rewrite
and .htaccess usage correctly.

しかし、実際には共有リモートサーバーを使用しているので、どこから変更するかapache config、またmod_rewrite

注:-このドキュメントを読んだ後にいくつかの変更を加えたため、私のプロジェクトはローカルホストで動作します。

どんな助けでも大歓迎です。

4

1 に答える 1

1

表示されていないエラーがあるような気がします。すべてのエラーを表示していますか?

  1. 以下を に追加しますindex.php

    error_reporting(E_ALL);
    ini_set('display_errors', 'on');
    
  2. これらを構成ファイル (ほとんどの場合、 の[development : production]セクションapplication.ini) に設定しましたか?

    [development : production]
    phpSettings.display_startup_errors = 1
    phpSettings.display_errors = 1
    resources.frontController.params.displayExceptions = 1
    
  3. アプリケーションはdevelopment環境内にありますか? index.phpほとんどの場合、これを次のように設定できます。

    // Define application environment
    defined('APPLICATION_ENV')
        || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development'));
    

これにより、隠れているエラーが表示される場合があります。エラーが問題の解決に役立つことを願っています。

于 2012-05-27T08:27:46.830 に答える