user3475251 user3475251 - 6 months ago 16
PHP Question

How Create modules in yii framework

I can't create modules in yii.I have a parent directory with name

jobsite_orginal
,it can run by these url
localhost/yii/jobsite_orginal/
.

I have created a folder name
modules
in protected folder of
jobsite_orginal
directory. After that i have created the folder name
supplier
. Supplier folder includes the controller,views and components folders and also the file SupplierModule.php.

I had edited the main file in config folder. After that i run the project with localhost/yii/jobsite_orginal/supplier/site/register

(register is the action in the conroller site ie in the supplier module),but i dont get.Anybody help me?

My SupplierModule.php

<?php
class SupplierModule extends CWebModule
{
public $defaultController = 'Site';
}
?>


My config/main.php

'modules'=>array(
'supplier'=>array()
),

Answer

Remove PATH_FORMAT from urlManager settings and showScriptName = false then try this url

localhost/yii/jobsite_orginal/index.php?r=supplier/site/register
Comments