if ((!isset($_SERVER['argv'])) || (!isset($_SERVER['argc']))) {
// Maybe not right PHP mode? (needs CLI?)
trigger_error(sprintf('[%s:%d]: argv/argc not set: %s', __METHOD__, __LINE__, print_r($_SERVER, true)), E_USER_ERROR);
- } // END - if
+ }
// Get the "request data" from the command-line argument list
$args = $_SERVER['argv'];
if ($_SERVER['argc'] < 2) {
// Skip this
return;
- } // END - if
+ }
// Is the first element "index.php" ?
if ($args[0] == 'index.php') {
// Then remove it
array_shift($args);
- } // END - if
+ }
// Try to determine next parameters
foreach ($args as $arg) {
// Set a name=value pair escaped and secured
$this->setRequestElement($argArray[0], escapeshellcmd($argArray[1]));
}
- } // END - foreach
+ }
}
/**