This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. 修改 php-fpm.conf 文件,添加(或修改)如下配置: | |
[global] | |
error_log = log/error_log | |
[www] | |
catch_workers_output = yes | |
2. 修改 php.ini 文件,添加(或修改)如下配置: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 创建一个用户,并授予其指定数据库的所有权限。 | |
grant all privileges on `user`.* 'username'@'%' identified by 'password' with grant option; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 将原尺寸缩放使之能够填充目标尺寸,缩放后尺寸小于或等于目标尺寸, | |
* 且有一边与原尺寸相同。 | |
* @param w1 目标尺寸 - 宽度 | |
* @param h1 目标尺寸 - 高度 | |
* @param w2 原尺寸 - 宽度 | |
* @param h2 原尺寸 - 高度 | |
*/ | |
function contain(w1, h1, w2, h2) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 停止当前mysql服务 | |
/etc/init.d/mysqld stop | |
# ---- | |
# 启动mysql | |
/etc/init.d/mysqld start | |
# 使用空密码登录mysql | |
mysql -u root |