
php
飞_持续更新在cnblogs
这个作者很懒,什么都没留下…
展开
-
PHP 使用 pdo 操作oracle数据库 报错
## SELECT UNID,NAME,NAME_XML WHERE UNID>=10 AND UNID<=15 ## 在10到15这5条数据中不为空数据php: symbol lookup error: ...php/lib/php/extensions/no-debug-non-zts-20170718/pdo_oci.so: undefined symbol: GC_AD...原创 2019-10-25 14:07:04 · 342 阅读 · 0 评论 -
阿里云 oss 文件上传 小坑
阿里云OSS 文件上传PHP 文件上传 : oss php 文件上传web 端直传: web端直传实践web 端直传 ,服务端签名 服务端签名,web端直传web端直传,在阿里云文档修改配置文件 $id, $key ,$host ; $host 有个小坑,原文:$host:格式为BucketName.Endpoint,例如post-test.oss-cn-hangzhou...原创 2018-10-26 18:56:19 · 1098 阅读 · 0 评论 -
centos PHP7 yii2 报错 Call to undefined function yii\\helpers\\mb_strlen()
出现问题 Call to undefined function yii\\helpers\\mb_strlen() "data": { "name": "Exception", "message": "Call to undefined function yii\\helpers\\mb_strlen()", "code":原创 2018-11-06 16:33:14 · 1900 阅读 · 0 评论 -
php之 trim ltrim rtrim 小坑
trim, ltrim, rtrim , 有第二个参数,可以指定过滤的字符小坑demo://ltrim区分左边的 间隔就是右边第一个字符, 这样写没有可读性$str = "qwertyuiop";$bbb = ltrim($str,'qpwoei');$ccc = ltrim($str,'qprwoei');$ddd = ltrim($str,'qaaaaaaaaaw');$e...原创 2018-11-05 11:42:42 · 673 阅读 · 0 评论 -
php 魔术方法 __call
__call 魔术方法//文件名字__call (自己随便起名字)/** * 在对象中调用一个不可访问方法时,__call() 会被调用。 * * 在静态上下文中调用一个不可访问方法时,__callStatic() 会被调用。 * * $name 参数是要调用的方法名称。$arguments 参数是一个枚举数组,包含着要传递给方法 $name 的参数。 * * @link ...原创 2018-11-13 15:07:10 · 712 阅读 · 0 评论 -
xss csrf
csrf 跨站请求伪造xss 跨站脚本攻击原创 2019-01-13 11:02:08 · 283 阅读 · 0 评论 -
PHP --反射 --获取类的方法
通常获取类方法get_class_methods(),这个函数只能返回 public 类型的方法classApple{publicfunctionfirstMethod(){}finalprotectedfunctionsecondMethod(){}privatestaticfunctionthirdMethod(){}}$...原创 2019-03-05 20:33:36 · 846 阅读 · 1 评论 -
php swoole
01) 让 phpstorm 对swoole的函数有智能提示下载地址https://github.com/swoole/ide-helper原创 2019-03-20 11:57:19 · 226 阅读 · 0 评论 -
php json_encode 参数常量
JSON_HEX_TAG => 1JSON_HEX_AMP => 2JSON_HEX_APOS => 4JSON_HEX_QUOT => 8JSON_FORCE_OBJECT => 16JSON_NUMERIC_CHECK => 32JSON_UNESCAPED_SLASHES => 64JSON_PRETTY_PRINT => 12...原创 2019-06-05 10:42:53 · 838 阅读 · 0 评论 -
windows PHPstudy curl file_get_contents 本地项目之间互相访问超时
场景: windows7 phpstudy2016 php7.3 nginx, 使用curl file_get_content本地项目之间互相访问一直超时或者失败场景再现demo.test.com:80文件 E:\selfweb\git_dev\test\index.php 内容如下:<?php$file = file_get_contents("http://demo.t...原创 2019-05-28 12:06:09 · 520 阅读 · 0 评论 -
ubuntu& phpstorm & xdebug 调试 php
前面已经写了其他环境的配置,这里只做简单介绍:sudo apt-get install php-xdebugphp -v 后显示如下: 在 /etc/php/7.0/mods_availabel 下会增加 xdebug.ini ,编辑这个文件;添加 如下内容: xdebug.idekey="PHPSTORM"xdebug.remote_handler = "dbgp...原创 2018-10-17 18:48:27 · 268 阅读 · 0 评论 -
vagrant & centos & phpstorm & xdebug 调试
f!!!! 温馨提醒 PHP版本一点要和xdebug版本对应 ###查看安装的xdebug 01[root@localhost php.d]# yum list | grep xdebugRepodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fastphp-composer-xdebug-h...原创 2018-10-17 18:30:08 · 342 阅读 · 0 评论 -
Yii2.0 rules验证规则大全
Yii2.0 rules验证规则大全required : 必须值验证属性[['字段名'],required,'requiredValue'=&amp;amp;amp;amp;amp;gt;'必填值','message'=&amp;amp;amp;amp;amp;gt;'提示信息']; #说明:CRequiredValidator 的别名, 确保了特性不为空.指定场景[['title', 'content'], 'required', 'on' =&原创 2018-10-15 18:04:15 · 572 阅读 · 0 评论 -
php数组的遍历讲解 for foreach list each key
转载: php数组的遍历讲解 for foreach list each keyphp数组的遍历讲解本文主要讲解for,foreach,list,each,key,指针操作相关函数,array_flip ,array_reverse,array_walks等函数的对数组的遍历转载 2017-12-05 18:16:15 · 253 阅读 · 0 评论 -
phpstorm 配置 xdebug调试工具
转载:http://www.cnblogs.com/IT--Loding/p/6013795.htmlphpstorm 配置 xdebug调试工具请先看后面的温馨提示!请先看后面的温馨提示!请先看后面的温馨提示!注意这里的配置不要写错了,否则最后运行debug没有效果windows环境配置[Xdebug]zend_exte...原创 2017-07-14 11:57:42 · 649 阅读 · 0 评论 -
php逐行读取txt文件写入数组的方法
php逐行读取txt文件写入数组的方法测试数据:test01test02test03test04test05test06test07test08test09test10test11test12方法01$fileUrl = "E:\web\log.txt";$isss=file_exists($fileUrl) or exit("There is ...原创 2017-12-25 17:12:39 · 4989 阅读 · 0 评论 -
PHP编译configure时常见错误,和PHP7.1.4 编译安装
本文总结了一些常见的configure错误信息和解决这些错误的经验。【以下为转载内容】1、configure: error: No curses/termcap library found网上有的说法是:–with-named-curses-libs=/usr/lib/libncursesw.so.5其实是不对的,虽然能解决configure的错误,但是make的时候会提示错误,正确的做法应该是c...转载 2018-03-18 11:08:09 · 879 阅读 · 0 评论 -
php.ini-development 和 php.ini-production
装完PHP7.0.28 发现没 php.ini 文件。只有php.ini-developmentphp.ini-production而PHP还是会去加载 php.ini 作为配置文件。所以要将 php.ini-production 拷贝为 同一目录下的 php.ini 【官方解释】...原创 2018-03-18 14:12:26 · 1509 阅读 · 0 评论 -
centos 16安装PHP7.0 异常 No pool defined. at least one pool section must be specified in config file
异常内容:root@ubuntu:/data/server/php7/lib/php# /data/server/php7/sbin/php-fpm[27-Mar-2018 20:57:22] WARNING: Nothing matches the include pattern '/data/server/php7/etc/php-fpm.d/*.conf' from /data/serve...原创 2018-03-28 13:06:47 · 1704 阅读 · 1 评论 -
php7 安装 imagick 扩展
ubuntu16 安装PHP7 imagick 扩展温馨提示: 在安装过程中出现错误,一般是由于缺少编译工具包导致,可根据提示参照第一步安装相应的工具包即可1、安装 ImageMagickwget http://www.imagemagick.org/download/ImageMagick.tar.gz解压到指定目录【我这里是 /data/server/other_component/】...原创 2018-04-24 14:49:46 · 2098 阅读 · 0 评论 -
php 函数
1、 http_build_query 生成 URL-encode 之后的请求字符串:数组array('foo', 'bar', 'baz''); 转为 foo=bar&baz=boom2、 php 程序执行函数system("php -v");passthru("php -v");exec("php -v");shell_exec("php -v");...原创 2018-05-25 11:36:53 · 196 阅读 · 0 评论 -
PHP 常见4种排序 冒泡排序、选择排序、插入排序、快速排序
1、冒泡排序原理:对一组数据,比较相邻数的大小,将值大的放到后面。<?php// 冒泡排序function bubbleOrder($arr){ $count = count($arr); $temp = 0; // 外层控制排序次数 for ($i = 0; $i < $count - 1; $i++) { // 内层控制...原创 2018-08-27 17:41:42 · 300 阅读 · 0 评论 -
php类型比较表
PHP类型比较表 官方地址原创 2018-09-04 00:42:15 · 238 阅读 · 0 评论