summaryrefslogtreecommitdiff
path: root/node_modules/locutus/php/info/ini_get.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/locutus/php/info/ini_get.js')
-rw-r--r--node_modules/locutus/php/info/ini_get.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/node_modules/locutus/php/info/ini_get.js b/node_modules/locutus/php/info/ini_get.js
new file mode 100644
index 0000000..4a4f052
--- /dev/null
+++ b/node_modules/locutus/php/info/ini_get.js
@@ -0,0 +1,27 @@
+'use strict';
+
+module.exports = function ini_get(varname) {
+ // eslint-disable-line camelcase
+ // discuss at: http://locutus.io/php/ini_get/
+ // original by: Brett Zamir (http://brett-zamir.me)
+ // note 1: The ini values must be set by ini_set or manually within an ini file
+ // example 1: ini_set('date.timezone', 'Asia/Hong_Kong')
+ // example 1: ini_get('date.timezone')
+ // returns 1: 'Asia/Hong_Kong'
+
+ var $global = typeof window !== 'undefined' ? window : global;
+ $global.$locutus = $global.$locutus || {};
+ var $locutus = $global.$locutus;
+ $locutus.php = $locutus.php || {};
+ $locutus.php.ini = $locutus.php.ini || {};
+
+ if ($locutus.php.ini[varname] && $locutus.php.ini[varname].local_value !== undefined) {
+ if ($locutus.php.ini[varname].local_value === null) {
+ return '';
+ }
+ return $locutus.php.ini[varname].local_value;
+ }
+
+ return '';
+};
+//# sourceMappingURL=ini_get.js.map \ No newline at end of file