fixed $argv in webserver mode,

added Basic usage and Outputs into README
This commit is contained in:
2025-05-28 17:50:34 +02:00
parent 650cc46157
commit 54ae5e491c
3 changed files with 271 additions and 2 deletions

View File

@ -28,7 +28,7 @@ class APIlite
$this->doAction($_REQUEST['action']);
} else {
global $argv;
$switches = array_map('strtolower', $argv);
$switches = array_map('strtolower', is_array($argv) ? $argv : []);
if ((isset($_REQUEST['format']) && $_REQUEST['format'] == 'html') || in_array('--html', $switches)) {
$this->printHelpHTML();
} elseif ((isset($_REQUEST['format']) && $_REQUEST['format'] == 'typescript') || in_array('--typescript', $switches)) {