コードを別のシステムに切り替えたときにエラー (コードの下に記載) が表示されました。
構成:
OS : Windows 7 php サーバー : Xampp
この問題を解決するのを手伝ってください。前もって感謝します。
コード:
<?php
class settings{
public $theme;
public $db_pf;
function __construct(){
$this->theme="default";
$this->db_pf="task_";
$this->paths();
$this->abbr();
$this->errors();
$this->enable_db_config();
}
function paths(){
define(ROOT,$_SERVER['DOCUMENT_ROOT']);
define(BP,"/task/");
define(ABSPATH,"/task/ta-admin/");
define(ADMPATH,"/task/administrator/");
define(INCLUDE_PATH,ABSPATH."includes/");
define(MODULE_PATH,ABSPATH."modules/");
define(CONTENT_PATH,ABSPATH."contents/");
define(THEME_PATH,ABSPATH."templates/".$this->theme."/");
define(STYLE_PATH,THEME_PATH."styles/");
define(IMAGE_PATH,THEME_PATH."images/");
define(JS_PATH,BP."assets/js/");
define(JQ_PATH,BP."assets/jq/");
}
function enable_db_config(){
include(ROOT.BP."ta-includes/class-db-config.php");
}
function abbr(){
define(task_title,"Admin-Quit Tasker-");
define(LOGIN_TITLE," Administrator Login...");
define(SLOGAN,"Enabling Solutions to your Tasks...");
}
function errors(){
define(NOTFOUND,"Page not found");
define(GOBACK," please press ok to go back...");
}
}
$obj_settings=new settings();
?>
エラー:
Notice: Use of undefined constant ROOT - assumed 'ROOT' in C:\xampp\htdocs\task\ta-includes\class-settings.php on line 14
Notice: Use of undefined constant BP - assumed 'BP' in C:\xampp\htdocs\task\ta-includes\class-settings.php on line 15
Notice: Use of undefined constant ABSPATH - assumed 'ABSPATH' in C:\xampp\htdocs\task\ta-includes\class-settings.php on line 16
Notice: Use of undefined constant INCLUDE_PATH - assumed 'INCLUDE_PATH' in C:\xampp\htdocs\task\ta-includes\class-settings.php on line 17
Notice: Use of undefined constant CONTENT_PATH - assumed 'CONTENT_PATH' in C:\xampp\htdocs\task\ta-includes\class-settings.php on line 18
Notice: Use of undefined constant THEME_PATH - assumed 'THEME_PATH' in C:\xampp\htdocs\task\ta-includes\class-settings.php on line 19
Notice: Use of undefined constant STYLE_PATH - assumed 'STYLE_PATH' in C:\xampp\htdocs\task\ta-includes\class-settings.php on line 20
Notice: Use of undefined constant JS_PATH - assumed 'JS_PATH' in C:\xampp\htdocs\task\ta-includes\class-settings.php on line 21
Notice: Use of undefined constant JQ_PATH - assumed 'JQ_PATH' in C:\xampp\htdocs\task\ta-includes\class-settings.php on line 22