* @param int HTTPSVERIFYHOST
* @param int SSLVERSION
*
- * @copyright (C) 2007-2017 G. Giunta
+ * @copyright (C) 2007-2020 G. Giunta
* @license code licensed under the BSD License: see file license.txt
**/
class argParser
'LOCALPATH' => __DIR__,
);
- // check for command line vs web page input params
+ // check for command line (env vars) vs. web page input params
if (!isset($_SERVER['REQUEST_METHOD'])) {
- if (isset($argv)) {
- foreach ($argv as $param) {
- $param = explode('=', $param);
- if (count($param) > 1) {
- $pname = strtoupper(ltrim($param[0], '-'));
- $$pname = $param[1];
- }
+ foreach($_SERVER as $key => $val) {
+ if (array_key_exists($key, $args)) {
+ $$key = $val;
}
}
} else {