Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
php7.4-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eazy-template
php7.4-template
Commits
392cda04
Commit
392cda04
authored
Sep 15, 2025
by
xiezhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
4b1a3f29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
34 deletions
+34
-34
README.md
README.md
+34
-34
No files found.
README.md
View file @
392cda04
...
@@ -23,28 +23,28 @@
...
@@ -23,28 +23,28 @@
### 本地开发
### 本地开发
1.
**克隆项目**
1.
**克隆项目**
```
bash
```
bash
git clone <项目地址>
git clone <项目地址>
cd
php7.4-template
cd
php7.4-template
```
```
2.
**安装依赖**
2.
**安装依赖**
```
bash
```
bash
make
install
make
install
```
```
3.
**启动应用**
3.
**启动应用**
```
bash
```
bash
make run
make run
```
```
4.
**访问应用**
4.
**访问应用**
打开浏览器访问:http://localhost:8000
打开浏览器访问:http://localhost:8000
5.
**停止应用**
5.
**停止应用**
```
bash
```
bash
make stop
make stop
```
```
### 环境变量配置
### 环境变量配置
...
@@ -55,14 +55,14 @@
...
@@ -55,14 +55,14 @@
### Docker 部署
### Docker 部署
1.
**构建镜像**
1.
**构建镜像**
```
bash
```
bash
docker build
-t
php-hello-world
.
docker build
-t
php-hello-world
.
```
```
2.
**运行容器**
2.
**运行容器**
```
bash
```
bash
docker run
-p
8000:8000
-e
APP_PORT_1
=
8000 php-hello-world
docker run
-p
8000:8000
-e
APP_PORT_1
=
8000 php-hello-world
```
```
## 项目结构
## 项目结构
...
@@ -226,11 +226,11 @@ server {
...
@@ -226,11 +226,11 @@ server {
### 常见问题
### 常见问题
1.
**端口被占用**
1.
**端口被占用**
```bash
```
bash
# 查看端口占用
# 查看端口占用
lsof -i :8000
lsof
-i
:8000
# 或使用 make stop 停止应用
# 或使用 make stop 停止应用
```
```
2.
**Composer 依赖安装失败**
2.
**Composer 依赖安装失败**
-
检查网络连接
-
检查网络连接
...
@@ -266,18 +266,18 @@ apc.shm_size=128M
...
@@ -266,18 +266,18 @@ apc.shm_size=128M
### 应用优化
### 应用优化
1.
**使用 Composer 自动加载优化**
1.
**使用 Composer 自动加载优化**
```
bash
```
bash
composer dump-autoload --optimize
composer dump-autoload
--optimize
```
```
2.
**启用 Composer 类映射优化**
2.
**启用 Composer 类映射优化**
```
json
```
json
{
{
"config": {
"config"
:
{
"optimize-autoloader": true
"optimize-autoloader"
:
true
}
}
}
}
```
```
## 贡献指南
## 贡献指南
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment