mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-20 15:08:00 +00:00
added cli.. don't yet know why :D
This commit is contained in:
28
cli.php
Normal file
28
cli.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
define('DS', DIRECTORY_SEPARATOR);
|
||||
define('ROOT', dirname(__FILE__));
|
||||
define('CLI', 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');
|
||||
|
||||
if(FORCE_DOMAIN)
|
||||
define('DOMAINPATH',FORCE_DOMAIN);
|
||||
else
|
||||
define('DOMAINPATH',(isset($_SERVER['HTTPS'])?'https':'http').'://'.$_SERVER['HTTP_HOST'].'/');
|
||||
error_reporting(E_ALL & ~E_NOTICE);
|
||||
if(SHOW_ERRORS)
|
||||
ini_set('display_errors','On');
|
||||
else ini_set('display_errors','Off');
|
||||
include_once(ROOT.DS.'inc'.DS.'core.php');
|
||||
|
||||
$action = $argv[2];
|
||||
$params = $argv;
|
||||
|
||||
//lose first param (self name)
|
||||
array_shift($params);
|
||||
|
||||
$model = new PictshareModel();
|
||||
$model->backend($params);
|
||||
Reference in New Issue
Block a user