Indexへ戻る
config.php

■各ディレクトリ定義
定義名
BASE_DIRwebappディレクトリの絶対パス
LOG_DIRlogディレクトリの絶対パス
MOJAVI_FILEmojavi-all-classes.phpへの絶対パス
OPT_DIRMojaviのコアクラス以外のクラスファイルの絶対パス
■WEBディレクトリとパス
定義名
WEB_MODULE_DIRイメージファイルやCSSファイルなどを配置するディレクトリの絶対パス
SCRIPT_PATHindex.phpの絶対パス
■ACCESSOR NAME
定義名
MODULE_ACCESSOR'module'
ACTION_ACCESSOR'action'
■MODULEとACTION名
定義名 説 明
AUTH_MODULE
AUTH_ACTION
'Default'
'Login'
認証が必要なアクションを実行した場合に認証を行うアクション
DEFAULT_MODULE
DEFAULT_ACTION
'Default'
'DefaultIndex'
デフォルトのアクション
ERROR_404_MODULE
ERROR_404_ACTION
'Default'
'PageNotFound'
存在しないモジュールまたはアクションがリクエストされた場合に実行されるアクション
SECURE_MODULE
SECURE_ACTION
'Default'
'GlobalSecure'
認証されたユーザが権限のないアクションをリクエストした場合に実行されるアクション
UNAVAILABLE_MODULE
UNAVAILABLE_ACTION
'Default'
'Unavailable'
アプリケーションが有効でない場合に実行されるアクション
■その他の設定
定義名 説 明
AVAILABLE true  
DISPLAY_ERRORS 1 致命的なPHPエラーを表示するかどうか(1:on 0:off)
PATH_INFO_ARRAY
PATH_INFO_KEY
1
'PATH_INFO'
パス情報を保持する配列についての定義(1:$_SERVER array 2:$_ENV array)
URL_FORMAT 1 URLを生成する場合のフォーマット(1:GET format 2:PATH format)
USE_SESSIONS true セッションを扱うかどうかの指定
■example
 <?php
/**
 * Mojavi 設定ファイル
 **/

// ----- FILE-SYSTEM DIRECTORIES -----

/**
 * An absolute file-system path to the webapp directory.
 */
define('BASE_DIR'$GLOBALS['_MOJAVI_DIR']);

/**
 * An absolute file-system path to the log directory.
 *
 * Note: This directory must be writable by any user.
 */
define('LOG_DIR'BASE_DIR 'logs/');

/**
 * An absolute file-system path to the all-in-one class file Mojavi
 * uses.
 */
define('MOJAVI_FILE'"{$GLOBALS['_MOJAVI_BASE_DIR']}mojavi-all-classes.php");

/**
 * An absolute file-system path to the optional classes directory.
 */
define('OPT_DIR'"{$GLOBALS['_MOJAVI_BASE_DIR']}opt/");

// ----- WEB DIRECTORIES AND PATHS -----

/**
 * An absolute web path where modules can store public information such as
 * images and CSS documents.
 */
define('WEB_MODULE_DIR''/modpub/');

/**
 * An absolute web path to the index.php script.
 */
define('SCRIPT_PATH''/index.php');

// ----- ACCESSOR NAMES -----

/**
 * The parameter name used to specify a module.
 */
define('MODULE_ACCESSOR''module');

/**
 * The parameter name used to specify an action.
 */
define('ACTION_ACCESSOR''action');

// ----- MODULES AND ACTIONS -----

/**
 * The action to be executed when an unauthenticated user makes a request for
 * a secure action.
 */
define('AUTH_MODULE''Global');
define('AUTH_ACTION''Login');

/**
 * The action to be executed when a request is made that does not specify a
 * module and action.
 */
define('DEFAULT_MODULE''Global');
define('DEFAULT_ACTION''ViewHome');

/**
 * The action to be executed when a request is made for a non-existent module
 * or action.
 */
define('ERROR_404_MODULE''Global');
define('ERROR_404_ACTION''PageNotFound');

/**
 * The action to be executed when an authenticated user makes a request for
 * an action for which they do not possess the privilege.
 */
define('SECURE_MODULE''Global');
define('SECURE_ACTION''Secure');

/**
 * The action to be executed when the available status of the application
 * is unavailable.
 */
define('UNAVAILABLE_MODULE''Global');
define('UNAVAILABLE_ACTION''Unavailable');

// ----- MISC. SETTINGS -----

/**
 * Whether or not the web application is available or if it's out-of-service
 * for any reason.
 */
define('AVAILABLE'true);

/**
 * Should typical PHP errors be displayed? This should be used only for
 * development purposes.
 *
 * 1 = on, 0 = off
 */
define('DISPLAY_ERRORS'1);

/**
 * The associative array that may contain a key that holds path information
 * for a request, and the key name.
 *
 * 1 = $_SERVER array
 * 2 = $_ENV array
 *
 * Note: This only needs set if URL_FORMAT = 2.
 */
define('PATH_INFO_ARRAY'1);
define('PATH_INFO_KEY''PATH_INFO');

/**
 * The format in which URLs are generated.
 *
 * 1 = GET format
 * 2 = PATH format
 *
 * GET  format is ?key=value&key=value
 * PATH format is /key/value/key/value
 *
 * Note: PATH format may required modifications to your webserver configuration.
 */
define('URL_FORMAT'2);

/**
 * Should we use sessions?
 */
define('USE_SESSIONS'true);

?>