public static function get_full_url($file = "") { $file = strpos($file, Import::getDocumentRoot()) === false ? Import::getHost() . $file : str_replace(Import::getDocumentRoot(), Import::getHost(), $file); return $file; /*$documentRoot = substr(Import::getDocumentRoot(), 0, -1); $documentRoot = explode("/", $documentRoot); //---------------------------------------------------------- $arr = array(); //---------------------------------------------------------- for ($i = 1; $i < sizeof($documentRoot); $i++) { $file = strtr($file,array("/".$documentRoot[$i]."/" =>'/')); } //---------------------------------------------------------- $file = str_replace($_SERVER["HTTP_HOST"], "", $file); //---------------------------------------------------------- $file = (substr($file, 0, 1) != "/") ? $file : substr($file, 1); //---------------------------------------------------------- $url = (strpos($_SERVER["HTTP_HOST"], "localhost")) ? "" : "http://"; $url .= (substr($s = $_SERVER["HTTP_HOST"], -1) != "/") ? $s .= "/" : $s; $url .= $file; krumo($url);*/ //---------------------------------------------------------- return $url; }
.banner { overflow:hidden; margin:auto; text-align:center; background:#e9e9e9; height:100%; display:table-cell; vertical-align:middle; width:100%; } body { display:table; } </style> <div class = "compiler" onclick="window.open('http://52.11.82.242/Modules/DOM/examples/werm/modules/compiler/compiler_v0_module/?auto=true&url=<?php echo Import::getHost() . $_SERVER['REQUEST_URI']; ?> '); return false;"><p>COMPILE<p></div> <!--</compile>--> </body> <!--<compile {"ignore":"true" }>DO NOT DELETE COMMENT!!!!!--> <script> var clickTag = "http://www.google.com"; $(document).ready(init); function init() { new <?php echo $_POST['werm']['id'] . "_" . $_GET['size']; ?> ({size:"<?php echo $_GET['size']; ?>