ekstensi file view…
Perbedaannya ternyata pada versi cakenya
thtml untuk versi 1.1
ctp untuk versi 1.2
ekstensi file view…
Perbedaannya ternyata pada versi cakenya
thtml untuk versi 1.1
ctp untuk versi 1.2
Just 4 fun to see the error …
<?php
class Product extends AppModel
{
var $name = “Product”;
}
?>
/** fun changing..***/
when i change class Product into something else is says
Fatal error: Class ‘Product’ not found in F:\apache2triad\htdocs\cake\cake\libs\class_registry.php on line 138
when i change var $name = “Product”; into var $name = “ppp” it says
Error: Database table ppp for model Product was not found.
and see the output.. well it’s kinda fun
a little..
<?php
class ProductsController extends AppController
{
var $name = “Products”;
function index() {
$Data = $this->Product->find(‘all’);
$this->set(‘Data’, $Data);
}}
?>
** fun changing.. **
when i change ProductsController into something else it’s produce error
Error: ProductsController could not be found
when i change index() into something else.. it’s produce error…??
Error: The action index is not defined in controller
when i change var name= “Products” into “Produ” it’s says
Error: Database table produ for model Produ was not found.
when i change $this->set(‘Data’, $Data); into $this->set(‘Datas’, $Data);
Error:Undefined variable: Data [APP\views\products\index.ctp, line 2]..hmmm
when i change $Data = $this->Product->find(‘all’); into $Data = $this->Produ->find(‘all’);
whoaa.. produce mass error on screen…
“if you keep hitting the brick wall then you didn’t jump high enough”..
even the guestbook still in-understandable for me
.. i am reading this, finally… these links below are EXCELLENT!!!
for very beginner in cake
http://blog.paranoidferret.com/index.php/2008/10/17/cakephp-setup-and-configuration/
http://blog.paranoidferret.com/index.php/2008/11/07/cakephp-building-your-first-site/
All the articles and samples seem frightening…
mole takut nih … :p
Ada 3 direktori Struktur
/App -> tempat Aplikasi saya nanti
/Cake -> Inti Program Cake
/Vendor -> Di sini untuk plugin tambahan
Berikut detailnya
/app
/config -g files for your database, ACL,
/controllers - Controllers go here
/components - Components go here
/index.php - deploy /app as the DocumentRoot
/models - Models go here
/plugins - Plugins go here
/tmp - Used for caches and logs
/vendors - Contains third-party libaries
/views - Views go here
/elements - bits of views, go here
/errors - Your custom error pages go here
/helpers - Helpers go here
/layouts - Application layout files go here
/pages - Static views go here
/webroot - The DocumentRoot for the application
/css
/files
/img
/js
/cake - Cake's core libraries. Don't edit any.
index.php
/vendors - third-party libraries.
VERSION.txt - Let's you know what version o.
Input -> Processing -> Output
Controller -> Model -> View
Kira2 beginilah.
http://book.cakephp.org/view/309/Basic-Concepts
..still reading it..
Ada beberapa site yg mereka sarankan tuk memulai
http://bakery.cakephp.org/articles/view/baking-cakes-with-firephp
buat saya itu nanti saja, terallu ribet