PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, March 5, 2022

[FIXED] How to create modules in Yii framework

 March 05, 2022     module, php, yii     No comments   

Issue

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()
),

Solution

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

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


Answered By - Alex
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing