摘要: php 取时间范围所在的季度的开始和结束时间 阅读全文
posted @ 2014-07-11 18:58 欧麦噶地 阅读(589) 评论(0) 推荐(0) 编辑
摘要: //设置PEM证书,pfx证书转pem方法:openssl pkcs12 -in 2000000501.pfx -out 2000000501.pem$cacert = ROOT_DIR."config/paykey/weixinss.pem";$ch = curl_init();curl_set... 阅读全文
posted @ 2014-07-02 19:58 欧麦噶地 阅读(496) 评论(0) 推荐(0) 编辑
摘要: 过虑php代码中的空白和注释方法,适用于如框架中将配置文件或是框架核心文件加载到缓存文件中。即可将多个php文件代码整合到一个php文件中,并将代码中的空白和注释去掉。/**/* 去除代码中的空白和注释*params:$content为从php文件中读出的文本内容,即源代码,如用file_get_contents从config.php文件读出配置代码。*/function strip_whitespace($content) { $stripStr = ''; //分析php源码 $tokens = token_get_all ($content); $last_s... 阅读全文
posted @ 2013-09-03 11:16 欧麦噶地 阅读(124) 评论(0) 推荐(0) 编辑
摘要: ubuntu+nginx+php-cgi 环境开启php的curl功能 阅读全文
posted @ 2013-05-14 16:49 欧麦噶地 阅读(3480) 评论(0) 推荐(0) 编辑
摘要: ubuntu 设置php开机启动 阅读全文
posted @ 2013-05-14 10:16 欧麦噶地 阅读(845) 评论(0) 推荐(0) 编辑
摘要: <?php//验证码function ucode($length=4,$mode=1,$type='png',$width=48,$height=22) { $randval = rand(1000,9999); $_SESSION['IMGCODE']= $randval; $width = ($length*9+10)>$width?$length*9+10:$width; if ( $type!='gif' && function_exists('imagecreatetruecolor')) { 阅读全文
posted @ 2013-03-20 17:50 欧麦噶地 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 1 <?php 2 define ( "php_VERSION", "5.2.3" ); 3 function Pinyin($_String, $_Code = 'gb2312') { 4 $_DataKey = "a|ai|an|ang|ao|ba|bai|ban|bang|bao|bei|ben|beng|bi|bian|biao|bie|bin|bing|bo|bu|ca|cai|can|cang|cao|ce|ceng|cha" . "|chai|chan|chang|chao|che|che 阅读全文
posted @ 2013-03-20 17:38 欧麦噶地 阅读(1267) 评论(0) 推荐(0) 编辑
摘要: php ci框架使用qeephp框架的acl实现权限验证 阅读全文
posted @ 2013-03-20 16:30 欧麦噶地 阅读(1885) 评论(0) 推荐(0) 编辑
摘要: php 二维数组排序 阅读全文
posted @ 2013-03-13 11:01 欧麦噶地 阅读(222) 评论(0) 推荐(0) 编辑
摘要: php 判断文件是否可写 ci is_really_writable() 阅读全文
posted @ 2013-03-12 17:57 欧麦噶地 阅读(833) 评论(0) 推荐(0) 编辑