加载中
Mac使用brew安装多版本php

Mac 多版本php的安装 swingcoder 2020-05-31 因有些项目仍运行在已经废弃的php5的版本,有些运行在php7,所以需要配置多版本的php开发运行环境,下面是成功实践的安装步骤。 0. 环境说明 $ ...

2020/05/31 11:26
1.5W
给PHPSTORM添加XDEBUG调试功能

1、运行环境 nginx 1.0.14 php with fpm-cgi 5.5.9 mac os X 2、安装步骤 1)install xdebug wget http://xdebug.org/files/xdebug-2.2.3.tgz tar xzvf xdebug-2.2.3.tgz && cd xdebug-2.2.3...

2014/04/07 12:10
3.9K
php curl不能解析/etc/hosts设置的本地域名

mac os x +php5.6.30版本尝试过下面的参数仍然无效,直接无视/etc/hosts文件的定义,hosts文件权限已经全局可读。 function post_content($url, $data) { $ch = curl_init(); ...

2017/11/22 17:16
3.2K
thinkphp 5.0+ 的 Behavior行为AOP

本文介绍如何在thinkphp 5.0+中自定义标签拦截器(即自定义AOP行为) 1、定义一个Behavior处理器\application\index\behavior\Privilege.php namespace app\index\behavior; class Privilege...

2018/09/07 00:26
2.9K
修正thinkphp 3.2 的一个BUG: ERR: Redis server went away

之一、 Thinkphp3.2数据库连查方法cache()时个bug会导致查询失败 ERR: Redis server went away 获取不到Conf/redis.php的配置,全局方法S()是没有问题的,替换ThinkPHP/Library/Think/Cache/...

2018/09/04 18:37
2.7K
让CodeIgniter支持数据库读写分离

CodeIgniter PHP框架现在还不支持数据库读、写分离,网上介绍的方法在实际业务上实用性不高,本文试图从另外一个方向解决CodeIgniter的数据库读、写分离问题。

php://input 得不到数据的问题

php://input 获取数据流不支持 enctype="multipart/form-data" 参数,check here. php://input is a read-only stream that allows you to read raw data from the request body. In the ca...

2018/11/07 10:10
1.3K
nginx+php-fpm故障一则:13: Permission denied

13: Permission denied osx+nginx+php-fpm模式时,打不开任何页面,查看nginx log可以看到上面的错误信息。 问题原因:1 webroot目录没有访问权限,如drwx------@,2 php-fpm进程所有者用户没...

2019/07/31 15:12
1.2K
PHP:中文转拼音和拼音转中文

1.中文转拼音 优点:基于开源词库CC-CEDICT;可返回音调;多种内存资源选项;支持姓名优化(多音字) https://github.com/overtrue/pinyin 2.拼音转中文 优点:基于baidu输入法 API: http:/...

2017/09/11 14:30
968
数据库分片id的设计(PHP实例)

数据库分片id的设计(PHP实例)

2015/08/30 14:24
926
PHP:failed to ptrace PEEKDATA Input/output error

PHP的错误日志中经常出现以下错误 [11-Sep-2018 17:08:47] ERROR: failed to ptrace(PEEKDATA) pid 1695: Input/output error (5) [11-Sep-2018 17:08:47] NOTICE: finished trace of 1695 ...

2018/09/11 17:49
805
携程供应商接口数据解密AES/CBC/PKCS5Padding

AES/CBC/PKCS5Padding

2018/02/08 16:44
797
centos/linux/php-fpm服务器配置与优化

业务假设:阿里云 centos7+nginx+php-fpm+mysql 第一章 centos调优 vi /etc/sysctl.conf net.ipv4.tcp_max_tw_buckets = 6000 net.ipv4.tcp_sack = 1 net.ipv4.tcp_window_scaling = 1 net.i...

2017/07/18 17:17
702
php fsocket 异步调用 导致 nginx 499错误的原因

fastcgi_ignore_client_abort on; php-fpm加上这个参数就可以忽略client早于server abort的问题. nginx+php-fpm经测试:此参数并不能忽略user abort的信号,php代码仍然不会执行,只是Nginx...

2017/02/20 17:35
666
php xml array 互相转换

function xml2arr($xml) { $obj = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA); $json = json_encode($obj); $arr = json_decode($json,...

2018/03/19 17:12
627
nginx unit 性能有这么好?

https://unit.nginx.org/

2019/10/16 10:22
602
php curl上传文件新方法

php5.6之后的版本上传文件改为此种方式了 new \CURLFile(realpath($file_path)) 之前的方法 @$file_path 已经失败。

2017/12/19 17:33
565
DES/ECB/PADDING5的openssl加解密码方法

/** * des-ecb加密 * @param string $data 要被加密的数据 * @param string $key 加密密钥 */ function des_ecb_encrypt($data, $key){ return openssl_encrypt ($data, 'des-ecb', $key); }...

2020/03/24 19:11
453
如何制作一份接口文档(PHP版本)

如何制作一份接口文档(PHP版本)

2016/06/12 17:24
445

没有更多内容

加载失败,请刷新页面

返回顶部
顶部