Friday, March 16, 2012

CakePHP Framework for XAMPP and WAMP


for run cakephp freamwork on XAMPP server change


xampp/apache/conf/httpd.conf

LoadModule rewrite_module modules/mod_rewrite.so

remove # befor it



for tutorial

http://www.sitepoint.com/application-development-cakephp/


1. download cakephp

2. app//Config/database.php // for database connection 

3.  app//Config/core.php  
  line no : 187
// copy this cod or any other number value
 Configure::write('Security.salt', '375698373538389654213024796542158345345435328930');

  line no: 192 
// copy this code or any other alphanumeric value 
 Configure::write('Security.cipherSeed', 'tyda1212dDSEASASdWayYui4deasd121212121sdsaEdrMnh'); 


4.Now go to  MOdel Folder and create " post.php " page  (page name and modal name are same )

app/Model/Post.php

<?php class Post extends AppModel {
}

5. Now go to  Controller Folder and create " PostController.php " page  (page name and Controller name are same 


app/Controller/PostController.php

 
<?php

class PostController extends AppController {
    
public $helpers = array('Html''Form''Session');
    
public $components = array('Session');

    
public function index() {
        
$this->set('posts'$this->Post->find('all'));
    }
}


6.  Now go to  view Folder and create " post/index.ctp " page  Controller function name and page name.ctp are same 


app/view/post/index.ctp  


<h1Welcome in Cake PHP home Page</h1>

noteURL Calling method 

modal_name
/function_name(in Controller file )

1 comment:

  1. Hеllo, I desire to subscribe for this webpаge to get most гecent
    updates, so where can i do it рlease aѕsist.

    Here iis my web blog top breast enlargement pills

    ReplyDelete

If you Satisfied , Please Leave a comment