use a common index.inc to include stuff, updated config.php.dist (now takes the root path as parameter)
This commit is contained in:
parent
bec51f792a
commit
b1f513026a
8
api.php
8
api.php
@ -1,9 +1,5 @@
|
||||
<?php
|
||||
require_once 'lib/autoload.inc'; //SYSTEM Classes
|
||||
require_once 'demo_basic/autoload.inc'; //Project Classes
|
||||
require_once '/home/web/web/config/get_config.php';
|
||||
require_once 'index.inc';
|
||||
|
||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
||||
|
||||
echo \SYSTEM\API\api::run('\SYSTEM\API\verify','api_demo_basic',array_merge($_POST,$_GET));
|
||||
echo \SYSTEM\API\api::run(\SYSTEM\API\verify::class,api_demo_basic::class,array_merge($_POST,$_GET));
|
||||
new \SYSTEM\LOG\COUNTER("API was called sucessfully.");
|
||||
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
namespace WEBCRAFT;
|
||||
function basic_config(){
|
||||
function config($basepath){
|
||||
return array( array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING, E_ALL | E_STRICT),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL, 'http://www.url.to/project/'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH, '/server/path/to/project/'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH, $basepath.'/'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE, \SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE_MYS),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_HOST, '127.0.0.1'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PORT, ''),
|
||||
@ -12,8 +12,8 @@ function basic_config(){
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_DBNAME, 'db_name'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_PROJECT, 'demo_basic'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_SYSTEMPATHREL, 'lib/system/'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_CACHE, '/server/path/to/demo_basic/files/cache/'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_CACHE, $basepath.'/cache/'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS, array('deDE','enUS')),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_LANG, 'deDE'),
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CRON_LOG2SQLITE_PATH, '/server/path/to/projectlogextraction/'));
|
||||
array(\SYSTEM\CONFIG\config_ids::SYS_CRON_LOG2SQLITE_PATH, $basepath.'/log/'));
|
||||
}
|
||||
7
index.inc
Normal file
7
index.inc
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
require_once 'lib/autoload.inc'; //SYSTEM Classes
|
||||
require_once 'demo_basic/autoload.inc'; //Project Classes
|
||||
require_once 'config.php';
|
||||
|
||||
// Start SYSTEM
|
||||
\SYSTEM\system::start(\WEBCRAFT\config(dirname(__FILE__)));
|
||||
@ -1,9 +1,5 @@
|
||||
<?php
|
||||
require_once 'lib/autoload.inc'; //SYSTEM Classes
|
||||
require_once 'demo_basic/autoload.inc'; //Project Classes
|
||||
require_once '/home/web/web/config/get_config.php';
|
||||
include 'index.inc';
|
||||
|
||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
||||
|
||||
echo \SYSTEM\API\api::run('\SYSTEM\API\verify', 'page_demo_basic', array_merge($_POST,$_GET), 1, false, true);
|
||||
echo \SYSTEM\API\api::run('\SYSTEM\API\verify', page_demo_basic::class, array_merge($_POST,$_GET), 1, false, true);
|
||||
new \SYSTEM\LOG\COUNTER("Page was called sucessfully.");
|
||||
8
sai.php
8
sai.php
@ -1,8 +1,4 @@
|
||||
<?php
|
||||
require_once 'lib/autoload.inc'; //SYSTEM Classes
|
||||
require_once 'demo_basic/autoload.inc'; //Project Classes
|
||||
require_once '/home/web/web/config/get_config.php';
|
||||
include 'index.inc';
|
||||
|
||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
||||
|
||||
echo (new SYSTEM\SAI\saigui())->html();
|
||||
echo (new \SYSTEM\SAI\sai_gui())->html();
|
||||
@ -1,8 +1,4 @@
|
||||
<?php
|
||||
require_once 'lib/autoload.inc'; //SYSTEM Classes
|
||||
require_once 'demo_basic/autoload.inc'; //Project Classes
|
||||
require_once '/home/web/web/config/get_config.php';
|
||||
|
||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
||||
include 'index.inc';
|
||||
|
||||
echo \SYSTEM\SQL\setup::install();
|
||||
Loading…
x
Reference in New Issue
Block a user