Yii Framework Forum: How do you use a Yii app without a database - Yii Framework Forum

Jump to content

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

How do you use a Yii app without a database Rate Topic: -----

#1 User is offline   mydarkpassenger 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 16
  • Joined: 26-April 10

Posted 17 May 2010 - 03:51 AM

I was interested in creating a Yii app without a database. Unfortunately, you can't create a controller unless a table exists with the same name. Is there a way to do this?
0

#2 User is offline   aztech 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 206
  • Joined: 12-December 08
  • Location:Poland

Posted 17 May 2010 - 05:29 AM

Could you elaborate more about your problem? It is ahrd to understand you
I'm not complete idiot... some parts are missing!
0

#3 User is offline   zaccaria 

  • Elite Member
  • PipPipPipPipPip
  • Yii
  • Group: Members
  • Posts: 2,232
  • Joined: 04-October 09
  • Location:Moscow

Posted 17 May 2010 - 09:10 AM

You can create a controller manually, by writing a class in the folder controllers named SomethingController.php.

In this file you can write
<?php

   class SomethingController extends CController
   {

      public function actionDoSomething()
      {
         ...
      }
   }

0

#4 User is offline   outrage 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 313
  • Joined: 10-November 09
  • Location:Blackpool, United Kingdom

Posted 17 May 2010 - 03:29 PM

Look at the 'blog' example in the download. The 'about' page is static if I remember. Use the same principal :)
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