Capture Cake (Ruby on Rails framework in PHP) graphic introduction 1th/2 page _php tips

Source: Internet
Author: User
Tags php and ruby on rails

Cake Frame home: http://www.cakephp.org/

After downloading the project, the catalogue structure is shown below (use version: 1.1.19.6305)

Build a PHP environment, where AppServ2.5.9 is used. Download homepage http://www.appservnetwork.com/

Create a new database blog in MySQL and run the following SQL Wen Jianqu.

/**//*The "Create our posts table"*/


CREATETABLEPosts (


IdIntUNSIGNED auto_incrementPRIMARYKEY,


TitleVARCHAR(50),


BodyTEXT,


CreatedDatetimeDEFAULTNull,


ModifiedDatetimeDEFAULTNull


);





/**//*Then Insert some posts for testing:*/


INSERTIntoPosts (title,body,created)


VALUES('The title','This is the post body.', now ());


INSERTIntoPosts (title,body,created)


VALUES ('A title once again', ' and thepost body follows.') , now ());
INSERT into posts (title,body,created)
VALUES ('Title Strikes Back', ' This isreally exciting! Not. ', Now ());

Modify the Project app/config/directory Database.php.default file name is database.php and modify its configuration.

Modifies the Apache httpd.conf file.

Apache2.2 version of, directly delete #LoadModule rewrite_modulemodules/mod_rewrite.so annotation.

2.0 previous versions were said to be modified in 2 places: LoadModule rewrite_module libexec/httpd/mod_rewrite.so and addmodule mod_rewrite.c

Add Model:

/app/models/post.php

Code:

?Php





Require_once('cake/app_model.php');





ClassPostExtendsAppmodel {





Public$name='Post';





Public$validate=Array(





'Title' =>  valid_not_empty ,

}
IMG src= "yun_qi_img/20081022215650208.gif" alt= "Capture cake (Ruby on Rails framework in PHP) graphic description 1th/2 page _php tips-ruby on Rails installation" >
?

Current 1/2 page 12 Next read the full text

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.