-
localhost:D:\xampp\htdocs\
1.改名
2.打开.gitignore文件,删除内容(内容为不共享)
3.删除 attachments目录下的.gitignore文件
4.复制.htaccess文件到dilicms目录下
5.打开navcat,新建数据库
6.新增用户,选择数据库,添加权限
7.本地域名
D:\xampp\apache\conf\extra\httpd-vhosts.conf 文件
添加
<VirtualHost *:80>
ServerAdmin
webmaster@dummy-host2.example.com
DocumentRoot "D:/xampp/htdocs/域名"
ServerName 域名.com
ErrorLog "logs/
dummy-host2.example.com-error.log"
CustomLog "logs/
dummy-host2.example.com-access.log" common
</VirtualHost>
8.启用本地域名
C:\Windows\System32\drivers\etc\hosts文件
添加
127.0.0.1 域名.com
9.重启apache,输入域名
10.开始安装dilicms
更改报错 /system/core/common.php
原代码:
return $_config[0] =& $config;
修改后:
$_config[0] =& $config;
return $_config[0];
11.连接用户
MySQL的用户
12.管理账号
DiliCMS的用户
13.进入diliCMS
url/admin/index.php
删除install文件夹
14.
localhost\dilicms(名称可自定义)
+
index.php
-
appplication
-
config
- routes.php
$route
[
'default_controller'
] =
"xx"
;
$route['404_override'] = '';
-
controllers
-
xx.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Home extends CI_Controller
//继承父类CI_Controller的构造函数
public function __construct(){
parent::__construct();
}
public function index()
{
$this->load->view('
yy
');
}
}
-
views
-
yy.php
调用文件夹templates/default 的文件:
<?=
base_url(
"templates/default"
)
?>
调用controllers的文件:'.base_url("进入的控制器名/?id=".$currentList(出来的控制器里定义的数组名)[$key]["id"]).'
-
models
-
templates
- default
- css
**.css
+ img
+ js
**.html