fix cli-server
[mdref/mdref] / views / layout.phtml
index 69b4c74c26d0a85e8cecd9e23cb68de9dca79808..6cc571ba21b44ef569da08627d54063b57b7a4fc 100644 (file)
                        <?php endif; ?>
                        mdref
                </title>
-               <base href="<?= $baseUrl ?>">
-               <meta http-equiv="Content-Location" content="<?= $baseUrl . $ref ?>">
-               <link rel="stylesheet" href="index.css">
+               <?php if (isset($baseUrl)) : ?>
+                       <base href="<?= $baseUrl ?>">
+                       <meta http-equiv="Content-Location" content="<?= $baseUrl . $ref ?>">
+                       <link rel="stylesheet" href="index.css">
+               <?php endif; ?>
+               
                <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
        </head>
        <body>
@@ -25,7 +28,7 @@
                        <?php include __DIR__."/index.phtml" ?>
                <?php endif; ?>
 
-               <?php if ($_SERVER["SERVER_NAME"] != "localhost") : ?>
+               <?php if (@$_SERVER["SERVER_NAME"] != "localhost") : ?>
                <div id="disqus_thread"></div>
                <script>
                        var disqus_shortname = 'mdref';
@@ -41,6 +44,8 @@
                <footer>
                        <?php include __DIR__."/footer.phtml" ?>
                </footer>
-               <script src="index.js"></script>
+               <?php if (isset($baseUrl)) : ?>
+                       <script src="index.js"></script>
+               <?php endif; ?>
        </body>
 </html>