On Wed, 27 Feb 2013 14:43:59 +0000 (UTC), Virgo Pärna <[email protected]>
wrote:
> I'm trying to learn CakePHP by doing tutorial blog (but that tutorial is
> 2.2 -
> mayby that's the problem) and I'm having two problems.
>
> When I name model file as Post.php, then every page outputs model at the
> top
> of web page.
> Like this:
> class Post extends AppModel { public $validate = array( 'title' =>
> array( 'rule' => 'notEmpty' ), 'body' => array( 'rule' => 'notEmpty' ) );
> } class Post extends AppModel { public $validate = array( 'title' =>
> array( 'rule' => 'notEmpty' ), 'body' => array( 'rule' => 'notEmpty' ) ); }
Ok, seems that model file needs to have <?php at the first line. This
is something that tutorial does not mention at all. And I'm rarely using php,
so it's easy to forgot, that php requires beginning tag.
--
Virgo Pärna
[email protected]
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.