PHP notice

Undefined index: HTTP_ACCEPT_LANGUAGE

D:\php\nginx-1.2.4\yii\vgt\protected\components\Controller.php(65)

53                 if(isset($_COOKIE["lang"])&&$_COOKIE["lang"]!=""){
54                     Yii::app()->language=$_COOKIE["lang"];
55                 }else{
56                     $lang=explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']);
57                     Yii::app()->language=strtolower(str_replace('-','_',$lang[0]));
58                     setcookie("lang",Yii::app()->language, time()+60*60*24*30,'/');
59                 }
60             }
61         }
62         else if(isset($_COOKIE["lang"])&&$_COOKIE["lang"]!=""){
63             Yii::app()->language=$_COOKIE["lang"];
64         }else{
65             $lang=explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']);
66             Yii::app()->language=strtolower(str_replace('-','_',$lang[0]));
67             setcookie("lang",Yii::app()->language, time()+60*60*24*30,'/');
68         }
69         
70         // 日期格式
71         if(isset(Yii::app()->session['username']) && Yii::app()->session['username'] != "")
72         {
73             $stmt =    "SELECT time_fomart from tbl_user where username = '".Yii::app()->session['username']."' and company_id = (select id from tbl_company where name = '".Yii::app()->session['companyname']."')";
74             $rawData=Yii::app()->dbPostgre->createCommand($stmt)->queryAll();
75             $format = null;
76             foreach ($rawData as $row)
77             {

Stack Trace

#3
+
 D:\php\nginx-1.2.4\yii\vgt\index.php(127): CApplication->run()
122 //        echo "You are not authorized to perform this action";
123 //        echo "the system is upgrading, please wait...";
124 //    }
125 //    else
126 //    {
127         Yii::createWebApplication($config)->run();
128 //    }
129 }
130 else
131 {
132     Yii::createWebApplication($config)->run();
2024-03-29 02:06:52 nginx/1.6.2 Yii Framework/1.1.12