Yii Framework Forum: Serverpath Error In Yii - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Serverpath Error In Yii I am getting this error : Undefined variable: serverPath Rate Topic: -----

#1 User is offline   Muhammad Shahzad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 68
  • Joined: 29-January 13
  • Location:Islamabad,Pakistan

Posted 14 February 2013 - 08:12 AM

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  }

0

#2 User is offline   deepanvi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 21-February 13

Posted 22 February 2013 - 12:56 AM

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

#3 User is offline   Muhammad Shahzad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 68
  • Joined: 29-January 13
  • Location:Islamabad,Pakistan

Posted 01 March 2013 - 05:23 AM

View Postdeepanvi, on 22 February 2013 - 12:56 AM, said:

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...
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users