First, add an index method to your class:
public function index () {}

Then, access the controllers the correct way:
http://localhost/Cake/Items
or
http://localhost/Cake/Items/index

This is assuming that "Cake" is a directory in your web root that contains
your whole cake project. Have you gone through the tutorial yet? You might
start there to get some basics down.

http://book.cakephp.org/view/1528/Blog

<http://book.cakephp.org/view/1528/Blog>Hope this helps,
~Philip

On Wed, Jun 8, 2011 at 12:56 PM, Magician <[email protected]>wrote:

> Hello everyone,
>
> I am trying to write a cake php application and currently am having a
> problem with the controller for it.  The code is as follows:
>
> <?php
>
> class ItemsController extends AppController
>
> {
> var $name = 'Items';
> var $scaffold;
> }
>
> ?>
>
> It is saved in the controllers folder as items_controller.php.  I
> tried accessing it directly at
> http://localhost/Cake/app/controllers/items_controller.php
> and get this error message:
>
>
> ( ! ) Fatal error: Class 'AppController' not found in C:\wamp\www\Cake
> \app\controllers\items_controller.php on line 5
> Call Stack
> #       Time    Memory  Function        Location
> 1       0.0388          364216  {main}( )       ..\items_controller.php:0
>
> I need some help.  Does anyone know what I've done wrong?
>

-- 
http://lonestarlightandsound.com/

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to