Serverpath Error In Yii

Hi,

I downloaded yii code from a website and tried to setup it a local WAMP server. But I am getting this error

Undefined variable: serverPath

What could be wrong? Here is full error description

D:\wamp\www\bulkresponse\protected\views\site\dashboard.php(21)







 $serverPath = 'http://'.Yii::app()->request->getServerName();




09  function bulkdaternage2(val1,obj)

10  {  

11       //alert(val1);

12      var daterange =$('#date_rang>option:selected').text();

13      var status  =$('#status').val();

14      var range_y  =$('#range_y').val();

15      var range_q  =$('#range_q').val();

16      var range_w  =$('#range_w').val();

17      var data = "range_y="+range_y+"&status="+status+"&range_q="+range_q+"&daterange="+daterange+"&range_w="+range_w+"&val1="+val1;

18      alert(data);

19     $.ajax({

20         type: 'POST',

21         url: "<?php echo $serverPath.CController::createUrl('site/bulkdaterange'); ?>",

22         data: data,

23         success: function(data) 

24         {

25         //alert(data);

26             

27             $("#graph_dashboard").html(data);

28            }

29 

30     });

31       

32         

33  }



A path alias is associated with a directory or file path. … When using namespaces, you might see an error about the application not .

Thanks I have Fit this…