Changeset 650 in t29-www


Ignore:
Timestamp:
Aug 29, 2014, 6:39:20 PM (5 years ago)
Author:
heribert
Message:

Windows-Verzeichnisrechnung korrigiert (Bug behoben)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/host.php

    r649 r650  
    233233                $this->script_filename = substr(realpath($_SERVER['SCRIPT_FILENAME']), strlen($this->document_root)); # e.g.: "/de/page.php"
    234234
     235                // Windows realpath() converts Unix Paths ($_SERVER) to Windows Paths (like \en\index.php).
     236                // We want to use unix paths ($_SERVER like) internally, so do this dummy conversion back, if neccessary
     237                $this->script_filename = str_replace('\\', '/', $this->script_filename);
     238               
    235239                # Bug when DOCUMENT_ROOT ends with trailing slash: make sure $file begins with /:
    236240                $this->slash_filename = $this->script_filename;
    237241                if($this->slash_filename{0} != '/') $this->slash_filename = '/'.$this->slash_filename;
    238                
    239                 // Windows realpath() converts Unix Paths ($_SERVER) to Windows Paths (like \en\index.php).
    240                 // We want to use unix paths ($_SERVER like) internally, so do this dummy conversion back, if neccessary
    241                 $this->script_filename = str_replace('\\', '/', $this->script_filename);
    242                
     242       
    243243                //phpinfo(); exit;
    244244                return $this; // Chaining
Note: See TracChangeset for help on using the changeset viewer.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License