it looks like bases is the root of your app. If you want the root of your app (routed by routes.php) use this url: http://localhost/bases/
If you want the posts index try this instead: http://localhost/bases/posts/index Hope that helps, Nick On Apr 2, 1:26 am, andresgi <[email protected]> wrote: > Hi to all, > > Today I just recently installed the framework and I began to > experiment with the tutorials/examples provided. I was doing this > onehttp://book.cakephp.org/view/219/Blogand I think I followed all of > the instructions correctly but when I try to access (http://localhost/ > bases/index) to see the result, I see the following error: > > //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > Missing Controller > Error: IndexController could not be found. > > Error: Create the class IndexController below in file: app\controllers > \index_controller.php > > <?php > class IndexController extends AppController { > > var $name = 'Index';} > > ?> > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > Here is my code from post.php, saved in C:\Program Files\xampp\htdocs > \bases\app\models: > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > / > <?php > > class Post extends AppModel { > var $name = 'Post';} > > ?> > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > Here is my code from posts_controller.php, saved in C:\Program Files > \xampp\htdocs\bases\app\controllers: > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > <?php > class PostsController extends AppController { > > var $name = 'Posts'; > > function index() { > $this->set('posts', $this->Post->find('all')); > } > > function view($id = null) { > $this->Post->id = $id; > $this->set('post', $this->Post->read()); > }} > > ?> > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > Here is my code from index.ctp, saved in CC:\Program Files\xampp\htdocs > \bases\app\views\posts: > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > <h1>Blog posts</h1> > <table> > <tr> > <th>Id</th> > <th>Title</th> > <th>Created</th> > </tr> > > <!-- Aqui se hace el ciclo que recorre nuestros arreglo $posts , > imprimiendo la información de cada post--> > > <?php foreach ($posts as $post): ?> > <tr> > <td><?php echo $post['Post']['id']; ?></td> > <td> > <?php echo $html->link($post['Post']['title'], > "/posts/view/".$post['Post']['id']); ?> > </td> > <td><?php echo $post['Post']['created']; ?></td> > </tr> > <?php endforeach; ?> > > </table> > /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// > > Thanks for the help in advance... > PS: I hope my English is readable Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en To unsubscribe, reply using "remove me" as the subject.
