PHP warning

Undefined variable $url

/hosting/verdevida/public_html/RequestManager.php(53)

41                 $this->_scriptUrl=substr($_SERVER['SCRIPT_NAME'],0,$pos).'/'.$scriptName;
42             elseif(isset($_SERVER['DOCUMENT_ROOT']) && strpos($_SERVER['SCRIPT_FILENAME'],$_SERVER['DOCUMENT_ROOT'])===0)
43                 $this->_scriptUrl=str_replace('\\','/',str_replace($_SERVER['DOCUMENT_ROOT'],'',$_SERVER['SCRIPT_FILENAME']));
44             else
45                 throw new CException(Yii::t('yii','CHttpRequest is unable to determine the entry script URL.'));
46         }
47         return $this->_scriptUrl;
48     }
49 
50     public function getBaseUrl($absolute = false){
51 
52         if($absolute){
53             $url .= $this->getHostInfo();
54         }
55 
56         $url .= rtrim(dirname($this->getScriptUrl()),'\\/');
57 
58         return $url;
59     }
60 
61     public function getUri(){
62         $dir = explode("/",$_SERVER['PHP_SELF']);
63         array_pop($dir);
64         return str_replace(implode("/",$dir),"",current(explode("?",$_SERVER['REQUEST_URI'])));
65     }

Stack Trace

#0
+
 /hosting/verdevida/public_html/header.php(9): RequestManager->getBaseUrl(true)
04 <!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
05 <!--[if gt IE 8]><!-->
06 <?php
07 include_once("RequestManager.php");
08 $request_manager = new RequestManager();
09 $base_url = $request_manager->getBaseUrl($absolute=true).'/';
10 $server = $_SERVER['SERVER_NAME'];
11 ?>
12 <base href="<?= $base_url ?>" />
13 <meta charset="utf-8">
14 <!--[if IE]>
#1
+
 /hosting/verdevida/public_html/premios.php(7): include("/hosting/verdevida/public_html/header.php")
02 
03 <html class="no-js">
04 
05 <head>
06     <title>Verde Vida - Prêmios</title>
07     <? include ('header.php'); ?>
08 
09 </head>
10 
11 <body>
12 
#2
+
 /hosting/verdevida/public_html/RequestManager.php(171): require_once("/hosting/verdevida/public_html/premios.php")
166             Utf8::encode($html);
167             echo $html;
168             exit;
169         }
170 
171         require_once($require_file);
172         exit;
173 
174     }
175 
176 }
2024-07-27 10:09:05 Apache Yii Framework/1.1.13