moved config to extra file so you can update without re-writing your config every time. Just don't forget to reame it

This commit is contained in:
Christian Haschek
2015-10-31 15:37:59 +01:00
parent b618e4970c
commit e2dda2ad56
3 changed files with 43 additions and 15 deletions

View File

@@ -1,10 +1,20 @@
<?php
session_start();
if(!file_exists(ROOT.DS.'inc'.DS.'config.inc.php'))
exit('Rename /inc/example.config.inc.php to /inc/config.inc.php first!');
include_once(ROOT.DS.'inc'.DS.'config.inc.php');
if(FORCE_DOMAIN)
define('DOMAINPATH',FORCE_DOMAIN);
else
define('DOMAINPATH',(isset($_SERVER['HTTPS'])?'https':'http').'://'.$_SERVER['HTTP_HOST'].'/');
define('DS', DIRECTORY_SEPARATOR);
define('ROOT', dirname(__FILE__));
define('DOMAINPATH',(isset($_SERVER['HTTPS'])?'https':'http').'://'.$_SERVER['HTTP_HOST'].'/');
require_once (ROOT . DS . 'inc' . DS . 'core.php');
error_reporting(E_ALL & ~E_NOTICE);
if(SHOW_ERRORS)
ini_set('display_errors','On');
else ini_set('display_errors','Off');
$pm = new PictshareModel();

View File

@@ -0,0 +1,20 @@
<?php
// shall we log all uploaders IP addresses?
define('LOG_UPLOADER', true);
//how many resizes may one image have?
//-1 = infinite
//0 = none
define('MAX_RESIZED_IMAGES',20);
//when the user requests a resize. Can the resized image be bigger than the original?
define('ALLOW_BLOATING', false);
//Force a specific domain for this server. If set to false, will autodetect.
//Format: https://your.domain.name/
define('FORCE_DOMAIN', false);
//Shall errors be displayed to the user?
//For dev environments: true, in production: false
define('SHOW_ERRORS', false);

View File

@@ -1,22 +1,20 @@
<?php
session_start();
// shall we log all uploaders IP addresses?
define('LOG_UPLOADER', true);
if(!file_exists(ROOT.DS.'inc'.DS.'config.inc.php'))
exit('Rename /inc/example.config.inc.php to /inc/config.inc.php first!');
include_once(ROOT.DS.'inc'.DS.'config.inc.php');
//how many resizes may one image have? set it to -1 for infinite resizes
define('MAX_RESIZED_IMAGES',4);
//when the user requests a resize. Can the resized image be bigger than the original?
define('ALLOW_BLOATING', false);
//don't change stuff beyond this point
define('DOMAINPATH',(isset($_SERVER['HTTPS'])?'https':'http').'://'.$_SERVER['HTTP_HOST'].'/');
if(FORCE_DOMAIN)
define('DOMAINPATH',FORCE_DOMAIN);
else
define('DOMAINPATH',(isset($_SERVER['HTTPS'])?'https':'http').'://'.$_SERVER['HTTP_HOST'].'/');
define('DS', DIRECTORY_SEPARATOR);
define('ROOT', dirname(__FILE__));
error_reporting(E_ALL & ~E_NOTICE);
ini_set('display_errors','On');
if(SHOW_ERRORS)
ini_set('display_errors','On');
else ini_set('display_errors','Off');
include_once(ROOT.DS.'inc'.DS.'core.php');
$url = $_GET['url'];