Php error using the extension UserCounter.php

Hi guys,

I’ve downloaded and installed the extension UserCounter ( http://www.yiiframework.com/extension/usercounter) to monitor the access to my website.

I followed the documentation then I created /protected/views/site/pages/counter.php:




<?php $this->pageTitle=Yii::app()->name; ?>

<?php

	// Execute the counter before you use the getter-funtions!

	Yii::app()->counter->refresh();

	

	?>







<p>online: <?php echo Yii::app()->counter->getOnline(); ?><br /></p>

<p>today: <?php echo Yii::app()->counter->getToday(); ?><br /></p>

<p>yesterday: <?php echo Yii::app()->counter->getYesterday(); ?><br /></p>

<p>total: <?php echo Yii::app()->counter->getTotal(); ?><br /></p>

<p>maximum: <?php echo Yii::app()->counter->getMaximal(); ?><br /></p>

<p>date for maximum: <?php echo date('d.m.Y', Yii::app()->counter->getMaximalTime()); ?></p>



but when I access it, I get a PHP error:

include(UserCounter.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory

What can I do?

Thaaanks!

You can use two ways:

1 - Define the file using the following command

path for jCalendar.php

C:\xampp\htdocs\yii\framework\sitename\protected\extensions\Calender\jCalendar.php





      Yii::import('application.extensions.Calender.jCalendar');




2 - file in the array configuration file to define

path of configuration file : C:\xampp\htdocs\yii\framework\sitename\protected\config\main.php




return array(

            .......

                  // autoloading model and component classes

                              'import'=>array(

                                              'application.models.*',

                                              'application.components.*',

                                              'ext.Calendar.jCalendar',

                                                                            


                                              ),

          .........