diff --git a/load.php b/load.php index 8a09748..7211e9c 100644 --- a/load.php +++ b/load.php @@ -1,81 +1,81 @@ . /* - * Start the boz-php framework + * Start the suckless-php framework */ // URL slash -defined('_') or define('_', '/'); +define( '_', '/' ); // directory separator -defined('__') or define('__', DIRECTORY_SEPARATOR); +define( '__', DIRECTORY_SEPARATOR ); // boz-php directory -define('BOZ_PHP', __DIR__ ); +define( 'BOZ_PHP', __DIR__ ); // load the functions require BOZ_PHP . __ . 'functions.php'; // in debug mode you see errors in HTML define_default( 'DEBUG', false ); // log every SQL query and eventually print them in HTML whenever DEBUG is also enabled define_default( 'DEBUG_QUERIES', false ); // HTTP protocol e.g. 'https' define_default( 'PROTOCOL', URL_protocol() ); // domain name e.g. 'reyboz.it' define_default( 'DOMAIN', URL_domain() ); // HTTP port e.g. ':8080' define_default( 'PORT', URL_port() ); // absolute URL directory without trailing slash e.g. '/myapp' or '' define_default( 'ROOT', URL_root() ); // URL without the ROOT define_default( 'BASE_URL', PROTOCOL . DOMAIN . PORT ); // URL with the ROOT define_default( 'URL', BASE_URL . ROOT ); // request charset define_default( 'CHARSET', 'utf-8' ); // trailing JavaScript / CSS parameter e.g. 'v=1' (will be automatically prefixed with &/?) define_default( 'CACHE_BUSTER', '' ); // autoload boz-php classes spl_autoload_register( function( $c ) { $path = BOZ_PHP . __ . "class-$c.php"; if( is_file( $path ) ) { require $path; } } ); if( ! defined( 'REQUIRE_LOAD_POST' ) ) { if( defined( 'ABSPATH' ) ) { define( 'REQUIRE_LOAD_POST', ABSPATH . __ . 'load-post.php' ); } else { error_die( "Please define ABSPATH or at least disable REQUIRE_LOAD_POST" ); } } if( REQUIRE_LOAD_POST ) { require REQUIRE_LOAD_POST; -} +} \ No newline at end of file