Advertisement
jargon

nen.php

Sep 28th, 2021
1,404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.90 KB | None | 0 0
  1. <?php
  2.  
  3. // configure global scope settings
  4. function nen_ini()
  5. {
  6.     // global scope initialization settings
  7.     global $nen;
  8.    
  9.     // assign domain root
  10.     $nen['domain']='Roe XAMPP Builder';
  11.    
  12.     // assign host mode (local)
  13.     $nen[ 'host' ] = 'local';
  14.    
  15.     // assign host mode (online)
  16.     //$nen[ 'host' ] = 'online';
  17.    
  18.     // switch http host vars
  19.     switch( $_SERVER[ 'HTTP_HOST' ] )
  20.     {
  21.        
  22.     case 'localhost':
  23.         // domain local
  24.         $nen[ 'root' ] = $_SERVER[ 'DOCUMENT_ROOT' ] . '/' . $nen[ 'domain' ] . '/';
  25.         break;
  26.  
  27.     default:
  28.         // domain host
  29.         $nen[ 'root' ] = $_SERVER[ 'DOCUMENT_ROOT' ] . '/';
  30.         break;     
  31.     }
  32.    
  33.     // return root configuration to global scope   
  34.     return $nen;
  35. }
  36.  
  37. // configure cascading stylesheet
  38. function nen_css()
  39. {
  40.     // global scope initialization settings
  41.     global $nen;
  42.    
  43.     // load stylesheet into memory 
  44.     return file_get_contents( $nen[ 'root' ]. 'css/stylesheet.css');
  45. }
  46.  
  47. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement