First line of index() is missing a semicolon
Schreck
-----Original Message-----
From: Jeff <jhullppc@gmail.com>
Date: Sat, 3 Oct 2009 13:01:48
To: CakePHP<cake-php@googlegroups.com>
Subject: unexpected T_VARIABLE
Hi,
I am just starting out with cake, making a Facebook app. I get the
following error:
Parse error: syntax error, unexpected T_VARIABLE in /users/home/
trompsbpbc/web/public/app/controllers/things_controller.php on line 22
And here is the code:
<?php
class ThingsController extends AppController {
var $user;
/**
* Name: beforeFilter
* Desc: Performs necessary steps and function calls prior to
executing
* any view function calls.
*/
function beforeFilter() {
$this->user = $this->facebook->require_login();
}
/**
* Name: index
* Desc: Display the friends index page.
*/
function index() {
// Retrieve the user's friends and pass them to the view.
$this->loadModel('Thing')
$things = $this->$Thing->find('all');
$this->set('things', $things);
$friends = $this->facebook->api_client->friends_get();
$this->set('friends', $friends);
}
}
?>
Can anyone tell me what is wrong?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Saturday, October 3, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment