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