先阅读这个http://www.jb51.net/article/16244.htm
接下来将一步一步对这个框架进行说明。
首先是下载框架:
官方主页:http://cakephp.org/
下载地址:http://cakeforge.org/frs/?group_id=23&release_id=428
官方文档:http://book.cakephp.org/view/305/The-Manual
第三方介绍:http://www.1x3x.net/cakephp/
这里选择稳定版本1.1.20.7692
下载cake_1.1.20.7692.zip文件并解压,如下图所示建立工程。
直接运行:http://localhost/cakephp_demo/
修改文件database.php.default的文件名为database.php,并修改其中的配置信息,例如:
-
class DATABASE_CONFIG
-
{
-
var $default = array('driver' => 'mysql',
-
'connect' => 'mysql_connect',
-
'host' => 'localhost',
-
'login' => 'root',
-
'password' => 'root',
-
'database' => 'test',
-
'prefix' => '');
-
-
var $test = array('driver' => 'mysql',
-
'connect' => 'mysql_connect',
-
'host' => 'localhost',
-
'login' => 'root',
-
'password' => 'root',
-
'database' => 'test',
-
'prefix' => '');
- }
重新运行上诉URL:
可见此时数据库连接成功了。
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn