自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(26)
  • 收藏
  • 关注

原创 Allowed memory size of 134217728 bytes exhausted (tried to allocate 2359296 bytes)

Allowed memory size of 134217728 bytes exhausted (tried to allocate 2359296 bytes)解析:134217728/1024/1024 = 128解决方案1:ini_set(‘memory_limit’,’256M’); //升级为申请256M内存解决方案2:修改php.ini修改php配置vi /usr/local/php/etc/php.inimemory_limit = 128 改成memory_l

2020-12-13 18:23:34 599

原创 MySQL远程登录

获取IP输入ifconfig得到eth0 inet addr:172.16.0.15MySQL授权root用户 以一个IP进行远程登录,并具有所有库任何操作权限,具体操作如下:在本机先使用root用户登录mysql:mysql -u root -p"youpassword"进行授权操作:GRANT ALL PRIVILEGES ON *.* TO root@"172.16.0.15" IDENTIFIED BY "youpassword" WITH GRANT...

2020-11-27 14:17:27 219

原创 linux查看svn用户名和密码

cd /root/.subversion/auth/svn.simple在这个目录下可以看到类似a2dc58b7668dba51b692081cc32ac86e的文件vim打开这样的文件就可以看到用户名和密码这样可以指定用户名和密码进行下载svn co 地址 --username xxx --password xxx...

2020-11-02 15:44:15 826

原创 安装phpcs和php-cs-fixer

安装phpcs和php-cs-fixer(1)使用环境:管理工具:composer IDE:phpstorm2017.3.6 插件:phpcs和php-cs-fixer更改 Packagist 为国内镜像:composer config -g repo.packagist composer https://packagist.phpcomposer.com(2)安装phpcscomposerglobalrequire"squizlabs/php_co...

2020-09-17 15:04:51 640

原创 wamp安装thinkphp6

使用国内镜像(阿里云)composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/安装开发版thinkphp6composer create-project topthink/think=6.0.x-dev tp因为本地使用的wamp,cli版本是5.6,因此会报错[InvalidArgumentException] Could not find package topthink/t..

2020-07-21 16:49:57 1247

原创 Nginx 显示 Access Denied

修改php.ini,将cgi.fix_pathinfo从0改为1,然后/etc/init.d/php-fpm reload

2020-07-14 15:42:50 145

原创 nginx-http-concat开源模块

该模块类似于apache中的mod_concat模块,用于合并多个文件在一个响应报文中。请求参数需要用两个问号('??')例如: http://example.com/??style1.css,style2.css,foo/style3.css 参数中某位置只包含一个‘?’,则'?'后表示文件的版本,例如: http://example.com/??sty...

2020-05-13 09:28:26 416

原创 nginx: unknown directive "concat"

服务器迁移后,nginx报错:unknown directive "concat"# nginx -Vnginx version: nginx/1.16.1built by gcc 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)built with OpenSSL 1.1.1d 10 Sep 2019TLS SNI support enable...

2020-05-13 09:28:02 862

原创 nginx access denied

nginx访问index.php出现access deniedindex.html页面能正常显示解决办法:#cgi.fix_pathinfo由0改为1vim /usr/local/php/etc/php.inicgi.fix_pathinfo=1修改nginx的vhost下的文件fastcgi_pass unix:/tmp/php-cgi.sock;fa...

2020-05-13 09:27:53 338

原创 nginx: [emerg] unknown log format “access”

在centOS系统中配置nginx的过程中,访问浏览器可能出现如下错误:nginx: [emerg] unknown log format “access”。解决:在nginx.conf配置文件中 include vhost/*.conf; 前面添加log_format access '$remote_addr - $remote_user [$time_local] ...

2020-05-13 09:27:45 424

原创 Linux安装PHP的Redis扩展

1、下载:https://pecl.php.net/package/redis选择适合PHP版本的插件redis-2.2.8.tgz2、安装#上传redis-2.2.8.tgz 到/usr/local/src目录cd /usr/local/src #进入软件包存放目录tar -zxvf redis-2.2.8.tgz #解压cd redis-2.2.8.tgz #进入...

2020-05-13 09:27:08 181

原创 Linux下卸载Redis

1、停止redis服务器# ps -ef | grep redisroot 28274 1 0 17:08 ? 00:00:02 /usr/local/redis/bin/redis-server 127.0.0.1:6379 root 28398 19147 0 18:01 pts/2 00:00:00 g...

2020-05-13 09:26:57 9946

原创 Linux下安装redis

1.获取redis资源官网下载稳定版本:https://redis.io/download2.解压  tar -xzvf redis-5.0.8.tar.gz3.安装  cd redis-5.0.8  make  cd src  make install PREFIX=/usr/local/redisPREFIX选项是配置安装的路径注意大写不能忽略,不...

2020-05-13 09:26:39 132

原创 Linux下安装Java

问题描述:通过yum安装的java,安装的是OpenJDK,是精简版的jdk,而不是oracle的jdk,没有安卓打包的工具jarsigner。所以我们先卸载OpenJDK,从oracle官网或者其他人分享的百度云下载jdk。需要版本的是java1.8,因此下载jdk-8u231-linux-x64.tar.gz然后开始卸载和安装# rpm -qa | grep javaja...

2020-05-10 11:32:00 388

原创 SSH设置秘钥

1、scrt创建密钥对先用scrt创建公钥和秘钥Identity.pub 是scrt生成的公钥文件,上传至服务器把公钥文件转换为服务器能识别的OpenSHH格式ssh-keygen -i -f Identity.pub >> authorized_keys2、服务器创建密钥对ssh-keygen <== 建立密钥对cat id_rsa.pub ...

2020-05-10 10:34:14 249

原创 Linux上安装rz和sz、pv、tree命令

安装与使用yum安装# yum -y install lrzsz

2020-05-10 10:33:49 415

原创 重置MySQL密码

1.跳过MySQL的密码认证过程#vim /etc/my.cnf在文档内搜索mysqld定位到[mysqld]文本段:[mysqld]port = 3306在[mysqld]后面任意一行添加skip-grant-tables用来跳过密码验证过程2.重启MySQL:/etc/init.d/mysql restart3.重启...

2020-05-10 10:33:28 264

原创 Linux上配置SVN

一、检查是否已经有svn[root@localhost ~]# svnserve --version-bash: svnserve: command not found二、安装在Linux下安装的是subversion,直接用yum 安装即可

2020-04-23 11:14:35 192

原创 linux下安装Imagick扩展

linux版安装imagick1、在这个网址下载ImageMagick.tar.gzhttps://www.imagemagick.org/download/2、安装imagick扩展模块[root@cvm software]# tar -xzvf ImageMagick.tar.gz[root@cvm software]# cd ImageMagick-7.0.10...

2020-04-05 20:08:50 1296

原创 Windows下安装Imagick扩展

1、安装前先查询phpinfo 查看版本信息PHP Version 5.6.40Compiler MSVC11 (Visual C++ 2012)Architecture x64Thread Safety enabled其中thread-safe 线程安全2、安装php扩展 php_imagick.dll下载地址:htt...

2020-04-05 20:06:46 2479

原创 Class 'Imagick' not found——thinkphp

Class 'Imagick' not found错误位置FILE: \ThinkPHP\Library\Think\Image\Driver\Imagick.class.php  LINE: 48框架:thinkphp3.2查看配置文件'IMAGE_CLASS' => '2', // 1:IMAGE_GD , 2: IMAGE_IMAGICK选项中的GD和Im...

2020-04-05 16:52:05 3369 1

原创 策略模式-PHP设计模式

策略模式namespace strategy;//策略模式,按照组合优于继承原则//问题抽象类abstract class Question { protected $promot; protected $marker; public function __construct($promot, Marker $marker) { ...

2019-12-06 16:32:16 84

原创 PHP保留两位小数各个方法的区别

$num = 1000.295;$num1 = number_format($num, 2); //1,000.30$num2 = number_format($num, 2, '.', ''); //1000.30 去掉千位分隔符$num3 = round($num, 2); //1000.3 四舍五入$num4 = sprintf("%.2f", $num); //10...

2019-11-18 12:21:31 110

原创 PHP 命名空间(一)

//global.php 无命名空间class Lister{ public static function test() { echo "from global \n"; }}//my.phpnamespace my;require_once 'product.php';class Lister{ public stat...

2019-11-08 17:18:58 83

原创 clone关键字和__clone()方法

clone关键字和__clone()方法class CopyeMe{ private $id;}$first = new CopyeMe();//$second 和 $first 指向同一个对象,对象的赋值和传递都是通过引用进行的$second = $first;//$third 和 $first 是两个不同对象,值复制的方式新生成了一个对象,获得了对象的副本$thi...

2019-11-08 12:24:49 294

原创 PHP的final类和方法

final关键字可以终止类的继承。final类不能有子类,final方法不能被覆写。申明类或方法为final,将减少灵活性,慎重使用final。//final类不能有子类final class ExampleOne{ //...}class ExampleTwo{ //final方法不能被覆写 final public function test(...

2019-11-07 16:21:44 183

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除