Skip to content

Commit eaa1150

Browse files
committed
first commit
0 parents  commit eaa1150

97 files changed

Lines changed: 68104 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Begin To Learn PHP And Deploy mdBook to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ] # 或你使用的主分支名,如 master
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Install Rust
14+
uses: dtolnay/rust-toolchain@stable
15+
with:
16+
components: rustfmt
17+
18+
- name: Install mdBook
19+
run: cargo install mdbook
20+
21+
- name: Build the book
22+
run: mdbook build
23+
24+
- name: Deploy to GitHub Pages
25+
uses: peaceiris/actions-gh-pages@v4
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
publish_dir: ./book
29+
publish_branch: gh-pages

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
book

book.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[book]
2+
authors = ["TageCode", "tagecode@hotmail.com"]
3+
language = "zh"
4+
src = "src"
5+
title = "Begin to learn PHP."
6+
7+
[output.html]
8+
default-theme = "Rust"
9+
preferred-dark-theme = "Ayu"

src/README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# 🎉 欢迎来到《Begin to Learn PHP》
2+
3+
这是一本专为零基础初学者设计的 `PHP` 学习教程,帮助你从零开始逐步掌握 `PHP` 编程技能。
4+
5+
## 关于本书
6+
7+
PHP 是一种广泛使用的开源脚本语言,特别适用于 Web 开发。
8+
9+
本书旨在为初学者提供一份完整、系统的 PHP 学习指南,帮助大家从零开始掌握 PHP 编程,无论你是初学者还是有一定经验的开发者,都能从中获益。
10+
11+
## 快速导航
12+
13+
- [前言](./PREFACE.md)
14+
15+
### Part 0: 混沌开天辟地
16+
17+
- [第0章:预备备](./chapter-00/prepare.md)
18+
19+
### Part I: PHP 基础入门
20+
21+
- [第1章:PHP 介绍与环境搭建](./chapter-01/introduction.md)
22+
- [第2章:PHP 基础语法](./chapter-02/basic-syntax.md)
23+
- [第3章:控制结构](./chapter-03/control-structures.md)
24+
25+
### Part II: 核心概念
26+
27+
- [第4章:函数](./chapter-04/functions.md)
28+
- [第5章:数组](./chapter-05/arrays.md)
29+
- [第6章:字符串处理](./chapter-06/strings.md)
30+
31+
### Part III: Web 开发基础
32+
33+
- [第7章:Web 表单处理](./chapter-07/web-forms.md)
34+
- [第8章:会话管理](./chapter-08/sessions-cookies.md)
35+
- [第9章:文件操作](./chapter-09/file-operations.md)
36+
37+
### Part IV: 数据库编程
38+
39+
- [第10章:MySQL 数据库基础](./chapter-10/mysql-basics.md)
40+
- [第11章:PDO 数据库操作](./chapter-11/pdo-database.md)
41+
42+
### Part V: 面向对象编程
43+
44+
- [第12章:面向对象基础](./chapter-12/oop-basics.md)
45+
- [第13章:OOP 高级特性](./chapter-13/oop-advanced.md)
46+
47+
### Part VI: 实战应用
48+
49+
- [第14章:错误与异常处理](./chapter-14/error-handling.md)
50+
- [第15章:安全编程](./chapter-15/security.md)
51+
- [第16章:实战项目](./chapter-16/project.md)
52+
53+
---
54+
55+
> 祝您阅读愉快!

src/SUMMARY.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Summary
2+
3+
- [首页🏠](./README.md)
4+
5+
- [前言🙂](./preface.md)
6+
7+
- [学习交流👗](./learn-group.md)
8+
9+
# Part 0: 混沌开天辟地
10+
11+
- [第0章:预备备](./chapter-00/prepare.md)
12+
- [心态准备](./chapter-00/mental-preparation.md)
13+
- [编程语言的诞生和发展](./chapter-00/language-born-and-development.md)
14+
- [编程语言排行榜](./chapter-00/programming-language-rankings.md)
15+
- [编程语言类型](./chapter-00/language-type.md)
16+
- [互联网常见的产品类型](./chapter-00/internet-product-type.md)
17+
- [什么是 web 开发-1](./chapter-00/what-is-web.md)
18+
- [什么是 web 开发-2](./chapter-00/what-is-web-development.md)
19+
- [PHP 语言生态](./chapter-00/php-language-ecology.md)
20+
- [使用 PHP 语言开发的产品](./chapter-00/php-language-product.md)
21+
- [引用内容](./chapter-00/php-content-refer.md)
22+
23+
# Part I: PHP 基础入门
24+
25+
- [第1章:PHP 介绍与环境搭建](./chapter-01/introduction.md)
26+
- [什么是 PHP](./chapter-01/what-is-php.md)
27+
- [PHP 发展史](./chapter-01/php-history.md)
28+
- [环境搭建](./chapter-01/environment-setup.md)
29+
- [第一个 PHP 程序](./chapter-01/first-program.md)
30+
- [开发工具推荐](./chapter-01/development-tools.md)
31+
32+
- [第2章:PHP 基础语法](./chapter-02/basic-syntax.md)
33+
- [PHP 标记](./chapter-02/php-tags.md)
34+
- [注释](./chapter-02/comments.md)
35+
- [变量与常量](./chapter-02/variables-constants.md)
36+
- [数据类型](./chapter-02/data-types.md)
37+
- [运算符](./chapter-02/operators.md)
38+
39+
- [第3章:控制结构](./chapter-03/control-structures.md)
40+
- [条件语句](./chapter-03/conditional-statements.md)
41+
- [循环语句](./chapter-03/loops.md)
42+
- [跳转语句](./chapter-03/jump-statements.md)
43+
- [包含文件](./chapter-03/include-files.md)
44+
45+
# Part II: 核心概念
46+
47+
- [第4章:函数](./chapter-04/functions.md)
48+
- [函数定义与调用](./chapter-04/function-definition.md)
49+
- [参数传递](./chapter-04/function-parameters.md)
50+
- [返回值](./chapter-04/return-values.md)
51+
- [变量作用域](./chapter-04/variable-scope.md)
52+
- [内置函数](./chapter-04/built-in-functions.md)
53+
54+
- [第5章:数组](./chapter-05/arrays.md)
55+
- [索引数组](./chapter-05/indexed-arrays.md)
56+
- [关联数组](./chapter-05/associative-arrays.md)
57+
- [多维数组](./chapter-05/multidimensional-arrays.md)
58+
- [常用数组函数](./chapter-05/array-functions.md)
59+
60+
- [第6章:字符串处理](./chapter-06/strings.md)
61+
- [字符串基础](./chapter-06/string-basics.md)
62+
- [字符串操作函数](./chapter-06/string-functions.md)
63+
- [正则表达式入门](./chapter-06/regex-intro.md)
64+
- [字符串格式化](./chapter-06/string-formatting.md)
65+
66+
# Part III: Web 开发基础
67+
68+
- [第7章:Web 表单处理](./chapter-07/web-forms.md)
69+
- [HTML表单基础](./chapter-07/html-forms.md)
70+
- [GET和POST方法](./chapter-07/get-post-methods.md)
71+
- [表单验证](./chapter-07/form-validation.md)
72+
- [文件上传](./chapter-07/file-uploads.md)
73+
74+
- [第8章:会话管理](./chapter-08/sessions-cookies.md)
75+
- [Cookie的使用](./chapter-08/cookies.md)
76+
- [Session会话](./chapter-08/sessions.md)
77+
- [用户认证基础](./chapter-08/authentication-basics.md)
78+
79+
- [第9章:文件操作](./chapter-09/file-operations.md)
80+
- [文件读写](./chapter-09/file-read-write.md)
81+
- [目录操作](./chapter-09/directory-operations.md)
82+
- [文件系统函数](./chapter-09/filesystem-functions.md)
83+
84+
# Part IV: 数据库编程
85+
86+
- [第10章:MySQL 数据库基础](./chapter-10/mysql-basics.md)
87+
- [数据库介绍](./chapter-10/database-intro.md)
88+
- [SQL基础语法](./chapter-10/sql-basics.md)
89+
- [MySQL连接](./chapter-10/mysql-connection.md)
90+
91+
- [第11章:PDO 数据库操作](./chapter-11/pdo-database.md)
92+
- [PDO介绍与连接](./chapter-11/pdo-intro.md)
93+
- [CRUD操作](./chapter-11/crud-operations.md)
94+
- [预处理语句](./chapter-11/prepared-statements.md)
95+
- [事务处理](./chapter-11/transactions.md)
96+
97+
# Part V: 面向对象编程
98+
99+
- [第12章:面向对象基础](./chapter-12/oop-basics.md)
100+
- [类与对象](./chapter-12/classes-objects.md)
101+
- [属性与方法](./chapter-12/properties-methods.md)
102+
- [构造函数与析构函数](./chapter-12/constructors-destructors.md)
103+
- [封装与访问控制](./chapter-12/encapsulation.md)
104+
105+
- [第13章:OOP 高级特性](./chapter-13/oop-advanced.md)
106+
- [继承](./chapter-13/inheritance.md)
107+
- [多态](./chapter-13/polymorphism.md)
108+
- [抽象类与接口](./chapter-13/abstract-interfaces.md)
109+
- [命名空间](./chapter-13/namespaces.md)
110+
111+
# Part VI: 实战应用
112+
113+
- [第14章:错误与异常处理](./chapter-14/error-handling.md)
114+
- [错误类型](./chapter-14/error-types.md)
115+
- [异常处理机制](./chapter-14/exception-handling.md)
116+
- [调试技巧](./chapter-14/debugging.md)
117+
118+
- [第15章:安全编程](./chapter-15/security.md)
119+
- [SQL注入防护](./chapter-15/sql-injection.md)
120+
- [XSS攻击防护](./chapter-15/xss-prevention.md)
121+
- [CSRF防护](./chapter-15/csrf-protection.md)
122+
- [密码安全](./chapter-15/password-security.md)
123+
124+
- [第16章:实战项目](./chapter-16/project.md)
125+
- [项目规划](./chapter-16/project-planning.md)
126+
- [用户注册登录系统](./chapter-16/user-auth-system.md)
127+
- [博客系统](./chapter-16/blog-system.md)
128+
- [部署与维护](./chapter-16/deployment.md)

0 commit comments

Comments
 (0)