From 851a26f8c9df9d2073c8145e98387226313d984c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=8C=E6=9E=AB?= Date: Thu, 30 May 2019 16:37:04 +0800 Subject: [PATCH 01/99] Create .gitattributes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改仓库语言 --- .gitattributes | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f9a2847 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +* text=auto +*.js linguist-language=php +*.css linguist-language=php +*.html linguist-language=php From 01f2f9ae82eea593b5dbbe5fee6f677dabde9a50 Mon Sep 17 00:00:00 2001 From: ColinLiu Date: Thu, 30 May 2019 16:40:10 +0800 Subject: [PATCH 02/99] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitattributes b/.gitattributes index f9a2847..8ca5643 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1 @@ -* text=auto -*.js linguist-language=php -*.css linguist-language=php -*.html linguist-language=php +*.md linguist-language=php \ No newline at end of file From f011bcee13b6855b0198df56f7393a0ae752cff3 Mon Sep 17 00:00:00 2001 From: ColinLiu Date: Thu, 30 May 2019 16:56:25 +0800 Subject: [PATCH 03/99] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 8ca5643..e2d2d97 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,3 @@ -*.md linguist-language=php \ No newline at end of file +*.md linguist-language=PHP +*.jpg linguist-language=PHP +*.png linguist-language=PHP \ No newline at end of file From 413e07db4da4fc75e800ecedb9479dae4f70411c Mon Sep 17 00:00:00 2001 From: ColinLiu Date: Thu, 30 May 2019 17:11:00 +0800 Subject: [PATCH 04/99] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index e2d2d97..e2e421c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1 @@ -*.md linguist-language=PHP -*.jpg linguist-language=PHP -*.png linguist-language=PHP \ No newline at end of file +*.* linguist-language=php \ No newline at end of file From b91abc6c0850442e102552c7d20f81f423e87bad Mon Sep 17 00:00:00 2001 From: ColinLiu Date: Sat, 1 Jun 2019 12:13:32 +0800 Subject: [PATCH 05/99] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 ++++-- "docs/01.\347\275\221\347\273\234/QA.md" | 2 +- docs/03.PHP/QA.md | 4 ++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ee30323..23adf99 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ 结合实际PHP面试,汇总自己遇到的问题,以及网上其他人遇到的问题,尝试提供简洁准确的答案 -网络、数据结构与算法、PHP、Web、MySQL、Redis、Linux、安全、设计模式、架构、面试等部分 +包含网络、数据结构与算法、PHP、Web、MySQL、Redis、Linux、安全、设计模式、架构、面试等部分 > 本仓库将持续更新,fork 无法看到最新内容,建议 Watch 或 Star ~~ @@ -68,7 +68,9 @@ - [客户端/服务端 IP 获取,了解代理透传 实际IP 的概念](./docs/03.PHP/QA.md#客户端服务端-ip-获取了解代理透传-实际ip-的概念) - [类的静态调用和实例化调用](./docs/03.PHP/QA.md#类的静态调用和实例化调用) - [PHP 不实例化调用方法](./docs/03.PHP/QA.md#php-不实例化调用方法) -- [php.ini 配置选项,ini_set 动态设置](./docs/03.PHP/QA.md#phpini-配置选项ini_set-动态设置) +- [php.ini 配置选项](./docs/03.PHP/QA.md#phpini-配置选项) +- [php-fpm.conf 配置](./docs/03.PHP/QA.md#php-fpmconf-配置) +- [502、504 错误产生原因及解决方式](./docs/03.PHP/QA.md#502504-错误产生原因及解决方式) - [如何返回一个301重定向](./docs/03.PHP/QA.md#如何返回一个301重定向) - [PHP 与 MySQL 连接方式](./docs/03.PHP/QA.md#php-与-mysql-连接方式) - [MySQL、MySQLi、PDO 区别](./docs/03.PHP/QA.md#mysqlmysqlipdo-区别) diff --git "a/docs/01.\347\275\221\347\273\234/QA.md" "b/docs/01.\347\275\221\347\273\234/QA.md" index 9408fa4..21155e7 100644 --- "a/docs/01.\347\275\221\347\273\234/QA.md" +++ "b/docs/01.\347\275\221\347\273\234/QA.md" @@ -176,7 +176,7 @@ HTTP 报文组成部分 |406|Not Acceptable|无可接受实体|| |408|Request Timeout|完成请求耗时太长服务器关闭连接|| |409|Conflict|请求可能在资源上引发冲突|| -|413|Request entiry too large|请求实体过大| +|413|Request entiry too large|请求实体过大|*| |500|Internal Server Error|服务器遇到错误|***| |501|Not Implemented|请求超过服务器的能力范围|| |502|Bad Gateway|代理或网关错误(无法连接到其父网关)|***| diff --git a/docs/03.PHP/QA.md b/docs/03.PHP/QA.md index 18e324d..ca39280 100644 --- a/docs/03.PHP/QA.md +++ b/docs/03.PHP/QA.md @@ -215,6 +215,10 @@ ini_set('memory_limit', '256M'); //设置最大内存限制 - Nginx+PHP 架构,可以调整 FastCGI 超时时间,fastcgi_connect_timeout、fastcgi_send_timeout、fastcgi_read_timeout +#### 500 + +#### 503 + ### 如何返回一个301重定向 ```php From 63e33d81a77f99613afbe0a6ae2414d8ee3774c4 Mon Sep 17 00:00:00 2001 From: ColinLiu Date: Sat, 1 Jun 2019 12:18:14 +0800 Subject: [PATCH 06/99] =?UTF-8?q?5xx=E7=B3=BB=E5=88=97=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=85=B3=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "docs/01.\347\275\221\347\273\234/QA.md" | 1 + 1 file changed, 1 insertion(+) diff --git "a/docs/01.\347\275\221\347\273\234/QA.md" "b/docs/01.\347\275\221\347\273\234/QA.md" index 21155e7..3381273 100644 --- "a/docs/01.\347\275\221\347\273\234/QA.md" +++ "b/docs/01.\347\275\221\347\273\234/QA.md" @@ -184,6 +184,7 @@ HTTP 报文组成部分 |504|Gateway Timeout|代理或网关超时(等待另一服务器响应超时)|***| 拓展阅读 [《HTTP状态码》](./05.HTTP状态码.md) +关联内容 [5xx系列错误](../03.PHP/QA.md#502504-错误产生原因及解决方式) ### 常见的 HTTP 方法 From 7a865609980f26ca872d25db559f7d68b63acaee Mon Sep 17 00:00:00 2001 From: ColinLiu Date: Sat, 1 Jun 2019 12:18:58 +0800 Subject: [PATCH 07/99] =?UTF-8?q?=E5=86=85=E5=AE=B9=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "docs/01.\347\275\221\347\273\234/QA.md" | 1 + 1 file changed, 1 insertion(+) diff --git "a/docs/01.\347\275\221\347\273\234/QA.md" "b/docs/01.\347\275\221\347\273\234/QA.md" index 3381273..3a0bfda 100644 --- "a/docs/01.\347\275\221\347\273\234/QA.md" +++ "b/docs/01.\347\275\221\347\273\234/QA.md" @@ -184,6 +184,7 @@ HTTP 报文组成部分 |504|Gateway Timeout|代理或网关超时(等待另一服务器响应超时)|***| 拓展阅读 [《HTTP状态码》](./05.HTTP状态码.md) + 关联内容 [5xx系列错误](../03.PHP/QA.md#502504-错误产生原因及解决方式) ### 常见的 HTTP 方法 From 60b594052e614a5f02d7ba6259db5a9022819878 Mon Sep 17 00:00:00 2001 From: ColinLiu Date: Sat, 1 Jun 2019 14:34:54 +0800 Subject: [PATCH 08/99] =?UTF-8?q?=E6=9B=B4=E6=96=B05xx=E7=B3=BB=E5=88=97?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "docs/01.\347\275\221\347\273\234/QA.md" | 2 +- docs/03.PHP/QA.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git "a/docs/01.\347\275\221\347\273\234/QA.md" "b/docs/01.\347\275\221\347\273\234/QA.md" index 3a0bfda..df69179 100644 --- "a/docs/01.\347\275\221\347\273\234/QA.md" +++ "b/docs/01.\347\275\221\347\273\234/QA.md" @@ -185,7 +185,7 @@ HTTP 报文组成部分 拓展阅读 [《HTTP状态码》](./05.HTTP状态码.md) -关联内容 [5xx系列错误](../03.PHP/QA.md#502504-错误产生原因及解决方式) +拓展阅读 [《5xx系列错误》](../03.PHP/QA.md#502504-错误产生原因及解决方式) ### 常见的 HTTP 方法 diff --git a/docs/03.PHP/QA.md b/docs/03.PHP/QA.md index ca39280..7acd48d 100644 --- a/docs/03.PHP/QA.md +++ b/docs/03.PHP/QA.md @@ -217,8 +217,12 @@ ini_set('memory_limit', '256M'); //设置最大内存限制 #### 500 +php 代码问题,文件权限问题,资源问题 + #### 503 +超载或者停机维护 + ### 如何返回一个301重定向 ```php From 479870c229ad79c2dece7716c72e2e5ad853318c Mon Sep 17 00:00:00 2001 From: ColinLiu Date: Sat, 1 Jun 2019 16:14:31 +0800 Subject: [PATCH 09/99] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/04.Web/QA.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/04.Web/QA.md b/docs/04.Web/QA.md index 566e360..8c1a61b 100644 --- a/docs/04.Web/QA.md +++ b/docs/04.Web/QA.md @@ -18,19 +18,19 @@ 提高网站速度:网站速度是搜索引擎排序的一个重要指标 -拓展阅读[《初探 SEO》](./04.Web/01.初探SEO.md) +拓展阅读[《初探 SEO》](./01.初探SEO.md) ### img 标签的 title 和 alt 有什么区别 title 属性规定关于元素的额外信息,这些信息通常会在鼠标移到元素上时显示一段提示文本 -alt 是标签的特有属性,是图片内容的等价描述。图片无法加载时显示。搜索引擎会重点分析 +alt 是``标签的特有属性,是图片内容的等价描述。图片无法加载时显示。搜索引擎会重点分析 ### CSS 选择器的分类 ![CSS选择器](./assets/web-css-CSS选择器.png) -拓展阅读[《CSS选择器的分类》](./04.Web/02.CSS选择器的分类.md) +拓展阅读[《CSS选择器的分类》](./02.CSS选择器的分类.md) ### CSS sprite 是什么,有什么优缺点 @@ -50,7 +50,7 @@ alt 是标签的特有属性,是图片内容的等价描述。图片无 维护麻烦,修改一个图片可能需要从新布局整个图片,样式 -拓展阅读[《雪碧图CSS Sprite的应用》](./04.Web/03.CSS-Sprite的应用.md) +拓展阅读[《雪碧图CSS Sprite的应用》](./03.CSS-Sprite的应用.md) ### display: none 与 visibility: hidden 的区别 @@ -126,7 +126,7 @@ link 可以通过 rel="alternate stylesheet"指定候选样式 具备属性:内容(content)、填充(padding)、边框(border)、边界(margin) -拓展阅读[《CSS盒模型》](./04.Web/04.CSS盒模型.md) +拓展阅读[《CSS盒模型》](./04.CSS盒模型.md) ### 容器包含若干浮动元素时如何清理(包含)浮动 @@ -163,7 +163,7 @@ link 可以通过 rel="alternate stylesheet"指定候选样式 不定宽块状使用 float:left 实现居中 -拓展阅读[《CSS 水平居中设置》](./04.Web/05.CSS水平居中设置.md) +拓展阅读[《CSS 水平居中设置》](./05.CSS水平居中设置.md) ### 如何竖直居中一个元素 @@ -171,7 +171,7 @@ link 可以通过 rel="alternate stylesheet"指定候选样式 父元素高度确定的多行文本 -拓展阅读[《CSS 垂直居中设置》](./04.Web/06.CSS垂直居中设置.md) +拓展阅读[《CSS 垂直居中设置》](./06.CSS垂直居中设置.md) ### flex 与 CSS 盒子模型有什么区别 @@ -179,7 +179,7 @@ link 可以通过 rel="alternate stylesheet"指定候选样式 Flex 布局,可以简便、完整、响应式地实现各种页面布局。目前,它已经得到了所有浏览器的支持,这意味着,现在就能很安全地使用这项功能 -拓展阅读 [《flex 布局的基本概念》](./04.Web/07.flex布局的基本概念.md) +拓展阅读 [《flex 布局的基本概念》](./07.flex布局的基本概念.md) ### Position 属性 @@ -191,7 +191,7 @@ Flex 布局,可以简便、完整、响应式地实现各种页面布局。目 |static|默认值。没有定位,元素出现在正常的流中(忽略 top, bottom, left, right 或者 z-index 声明)| |inherit|规定应该从父元素继承 position 属性的值| -拓展阅读 [《CSS Position学习》](./04.Web/08.CSS-Position学习.md) +拓展阅读 [《CSS Position学习》](./08.CSS-Position学习.md) ### PNG,GIF,JPG 的区别及如何选 @@ -211,19 +211,19 @@ Flex 布局,可以简便、完整、响应式地实现各种页面布局。目 脚本会阻塞页面其他资源的下载,因此推荐将所有`