{"id":192,"date":"2017-07-21T22:33:19","date_gmt":"2017-07-21T20:33:19","guid":{"rendered":"https:\/\/asdw.de\/scriptcase-entwicklungs-oder-produktivumgebung\/"},"modified":"2017-07-21T22:50:18","modified_gmt":"2017-07-21T20:50:18","slug":"scriptcase-entwicklungs-oder-produktivumgebung","status":"publish","type":"post","link":"https:\/\/asdw.de\/en\/scriptcase-entwicklungs-oder-produktivumgebung\/","title":{"rendered":"Check if Scriptcase development server or deployed environment"},"content":{"rendered":"<h2>Check if the software runs on a Scriptcase development environment or deployed server<\/h2>\n<p>Sometimes it is necessary to change parameters, depending on the environment the software is running on: Scriptcase Development or a server with the deployed application.<\/p>\n<p>Example: Accessing files which have been uploaded, cause the absolute and the relative path is different.<\/p>\n<p>Obviously the app could check the <a href=\"https:\/\/en.wikipedia.org\/wiki\/IP_address\" target=\"_blank\" rel=\"noopener\">IP adress<\/a> or the URL of the server it is running on.<\/p>\n<p>Carlos (Scriptcase) has shown a much more sophisticated way during a Webinar.<\/p>\n<p>He suggested to check the session variables of Scriptcase to check the path of the current environment:<\/p>\n<pre class=\"lang:php decode:true \" title=\"Pr\u00fcfen, ob Entwicklungs- oder Produktivumgebung\" data-url=\"{\">if(strpos($_SESSION[\"scriptcase\"][\"nm_path_prod\"],'scriptcase\/prod')&gt;0)\r\n   {\r\n      echo \"Using the Development environment.\";\r\n   }\r\nelse\r\n   {\r\n      echo \"Working on a productive server.\";\r\n   }\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Check if the software runs on a Scriptcase development environment or deployed server Sometimes it is necessary to change parameters, depending on the environment the software is running on: Scriptcase Development or a server with the deployed application. Example: Accessing<span class=\"ellipsis\">&hellip;<\/span><\/p>\n<div class=\"read-more\"><a href=\"https:\/\/asdw.de\/en\/scriptcase-entwicklungs-oder-produktivumgebung\/\">Read more &#8250;<\/a><\/div>\n<p><!-- end of .read-more --><\/p>\n","protected":false},"author":2,"featured_media":190,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[55],"tags":[53,47,52,48,49,54,50,51],"_links":{"self":[{"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/posts\/192"}],"collection":[{"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/comments?post=192"}],"version-history":[{"count":3,"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/posts\/192\/revisions"}],"predecessor-version":[{"id":196,"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/posts\/192\/revisions\/196"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/media\/190"}],"wp:attachment":[{"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/media?parent=192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/categories?post=192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/asdw.de\/en\/wp-json\/wp\/v2\/tags?post=192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}