Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Piatok, 23. október 2026

Rozdiely pre phpPlatonLib/Platon/Platon.php medzi verziami 1.23 a 1.24

verzia 1.23, 2004/04/11 16:19:46 verzia 1.24, 2004/12/12 21:41:05
Riadok 24 
Riadok 24 
  * @access      public   * @access      public
  */   */
   
 /* $Platon: phpPlatonLib/Platon/Platon.php,v 1.22 2004/01/26 13:53:55 nepto Exp $ */  /* $Platon: phpPlatonLib/Platon/Platon.php,v 1.23 2004/04/11 16:19:46 nepto Exp $ */
   
 class Platon  class Platon
 {  {
Riadok 153  class Platon
Riadok 153  class Platon
     } /* }}} */      } /* }}} */
   
     /**      /**
        * Performs a HTTP/1.1 redirect according to RFC 2068
        *
        * @param   string  $where      where to redirect (URL or local script)
        * @param   boolean $temporary  if such redirect is only temporary one
        * @todo    implement HTML page redirecting if output was aleady sent
        */
       function redirect($where, $temporary = false) /* {{{ */
       {
           $url = '';
           if (! strncmp($where, "ftp://", 6)
                   || ! strncmp($where, "http://",  7)
                   || ! strncmp($where, "https://", 8)) {
               $url = $where;
           } else {
               $url         = "http://";
               $http_host   = @$_SERVER['HTTP_HOST'];
               $server_name = @$_SERVER['SERVER_NAME'];
   
               if (isset($http_host) && strlen($http_host) > 0) {
                   $url .= $http_host;
               } elseif (isset($server_name) && strlen($server_name) > 0) {
                   $url .= $server_name;
               }
               if ($where[0] != '/') {
                   $url .= Platon::get_path_without_scriptname($_SERVER['REQUEST_URI']);
               }
               $url .= $where;
           }
   
           header('Location: '.$url);
           if (! $temporary) {
               header('HTTP/1.1 301 Moved Permanently');
           }
           exit;
       } /* }}} */
   
       /**
      * Redirects if it is neccessary for particular file.       * Redirects if it is neccessary for particular file.
      *       *
      * @param   string  $file   filename       * @param   string  $file   filename

Legend:
Odstranené z verzie1.23  
zmenené riadky
  Pridané vo verzii1.24

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok