こんにちは、cakephp に以下のコードを書きました。
<?php
//Posts is the name of my View folder, add, edit arethe pages in Posts folder.
echo $this->Posts('add_or_edit');
?>
<fieldset>
<legend>
<?php _('Add a Post'); ?>
</legend>
Please fill in all the fields.
<?php
echo $form->create('Post');
echo $form->error('Post.title');
echo $form->input('Post.title',array('id'=>'posttitle','label'=>'title','size'=>'50','maxlength'=>'255','error'=>false));
echo $form->error('Post.content');
echo $form->input('Post.content',array('id'=>'postcontent','type'=>'textarea','label'=>'Content:','rows'=>'10','error'=>false));
echo $form->end(array('label'=>'Submit Post'));
?>
</fieldset>
上記のコードを表示しようとするたびに、このようなエラーが発生します
Call to undefined method View::Posts() in C:\wamp\www\cake_php\app\View\Posts\add.ctp on line 2
私のコードに何か問題がありますか、それとも View ファイルを変更する必要がありますか?