0

I am new to php, Yii and working on trackstar example given in

"agile-web-application-development-with-yii-1-1-and-php5.9781847199584.52717"

I am trying to use following sitemap extension for yii

https://github.com/alphard-code/sitemap

Followed all steps to implement sitemap extension mentioned in above link but getting following warning, googled error but can't resolve it please help.

PHP warning

include(yiiExtensions/sitemap/SitemapComponent.php) [function.include]: failed to open stream: No such file or directory

C:\xampp\htdocs\yii\framework\YiiBase.php(421)

Tariq Mahmood
  • 164
  • 2
  • 15

2 Answers2

0

You have to import the file in config/main.php as shown below

Place the extension in protected/extension folder and place the code shown below in main.php file

'import'=>array(
    'ext.yiiExtensions.sitemap.SitemapComponent',
),
Ninad
  • 1,871
  • 3
  • 15
  • 23
0

I was using wrong file path. In yii "Application." gives access up to protected folder, further we can add path like in my case it was

Application.extension.sitemap.SitemapComponent

Tariq Mahmood
  • 164
  • 2
  • 15