{"id":230,"date":"2024-09-30T20:00:17","date_gmt":"2024-09-30T19:00:17","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=230"},"modified":"2025-03-04T04:33:38","modified_gmt":"2025-03-04T04:33:38","slug":"mwnci-getenv-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-getenv-function\/","title":{"rendered":"Mwnci getenv() Function"},"content":{"rendered":"<h2><span id=\"Syntax\" class=\"mw-headline\">Syntax<\/span><\/h2>\n<p>getenv(<i><b>key<\/b><\/i>)<\/p>\n<h2><span id=\"Description\" class=\"mw-headline\">Description<\/span><\/h2>\n<p>The <i>getenv()<\/i> function retrieves the value of the environment variable named by the key. It returns the value, which will be empty if the variable is not present.<\/p>\n<h2><span id=\"Example\" class=\"mw-headline\">Example<\/span><\/h2>\n<pre>include(\"main\")\r\nprintln(\"Home directory is: \", getenv(\"HOME\"))\r\n\r\n\r\nHome directory is: \/home\/eccles\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax getenv(key) Description The getenv() function retrieves the value of the environment variable named by the key. It returns the value, which will be empty if the variable is not present. Example include(&#8220;main&#8221;) println(&#8220;Home directory is: &#8220;, getenv(&#8220;HOME&#8221;)) Home directory is: \/home\/eccles<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-230","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=230"}],"version-history":[{"count":2,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/230\/revisions"}],"predecessor-version":[{"id":1101,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/230\/revisions\/1101"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}