Sunday, October 10, 2010

15 minute Blog Tutorial? Really?

Not sure why, but I'm the lucky guy that gets to spend WAYYYY more
than 15 minutes on a 'simple' demo. Admittedly I'm a noob, but one
would think that something this basic should work.

I dutifully copied and pasted the code from the tutorial examples in
to php files and uploaded them to my webserver, then I went to the url
as described in the tutorial - and Cake doesn't seem to be the least
bit interested in the blog stuff - it just wants a whole new set of
files NOT pointing at Posts, but pointing at

Missing Method in PostsController

Error: The action index.php is not defined in controller
PostsController

Error: Create PostsController::index.php() in file: app/controllers/
posts_controller.php.
<?php
class PostsController extends AppController {

var $name = 'Posts';


function index.php() {

}

}
?>

Notice: If you want to customize this error message, create app/views/
errors/missing_action.ctp.

So that's all well and good - it wants the basic PostsController class
to extend AppController ... but here's the contents of my file in
exactly the right place:

<?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());
}
}
?>

So now what? Anyone with help ... please?

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate