随笔分类 - PHP
I AM A PHPER
摘要:gzip是GNU zip的缩写,它是一个GNU自由软件的文件压缩程序,也经常用来表示gzip这种文件格式。软件的作者是Jean-loup Gailly和Mark Adler。1992年10月31日第一次公开发布,版本号是0.1,目前的稳定版本是1.2.4。 Gzip主要用于Unix系统的文件压缩。我
阅读全文
摘要:来源:http://www.splaybow.com/post/thinkphp-phpexcel-121.html
阅读全文
摘要:功能包括: 1、设置单元格格式,包括单元格边框、单元格高度、单元格宽度 2、合并指定的单元格 3、设置Excel数据源,并将数据源保护起来(这个是为了实现单元格下拉选项功能) 4、设置字体样式 来源:http://www.thinkphp.cn/topic/3739.html
阅读全文
摘要:error_reporting(E_ALL); date_default_timezone_set('Asia/shanghai'); /** PHPExcel_IOFactory */ require_once '../Classes/PHPExcel/IOFactory.php'; $inputFileName = '6081076641077444758.xls'; $objRe...
阅读全文
摘要:= ord("A") and $fchar = -20319 and $asc = -20283 and $asc = -19775 and $asc = -19218 and $asc = -18710 and $asc = -18526 and $asc = -18239 and $asc = -17922 and $asc = -17922 and $asc = -17417 and $a...
阅读全文
摘要:=65 and $firstchar_ord=48 and $firstchar_ord=-20319 and $asc=-20283 and $asc=-19775 and $asc=-19218 and $asc=-18710 and $asc=-18526 and $asc=-18239 and $asc=-17922 and $asc=-17417 and $asc=-16474 and...
阅读全文
摘要:= '5.0') ? array_combine ( $_TDataKey, $_TDataValue ) : $this->_Array_Combine( $_TDataKey, $_TDataValue ); arsort ( $data ); reset ( $data ); $str = $this->safe_encoding ( $s...
阅读全文
摘要:abc123 * 中文字符串:返回拼音首字符 eg. 测试字符串 => CSZFC * 中英混合串: 返回拼音首字符和英文 eg. 我i我j => WIWJ * eg. * $py = new str2PY(); * $result = $py->getInitials('啊吧才的饿飞就好i就看了吗你哦平去人是他uv我想一在'); */ class ...
阅读全文
摘要:Thinkphp/Library/Think下新文件文件:Csv.class.php 导出: $csv=new Csv(); $list=M("childs")->field($field)->limit(10)->select();//查询数据,可以进行处理 $csv_title=array('ID','name','email','phone','time','IP'); $csv->...
阅读全文
摘要:1、使用对象的方法插入数据 D用法。 $Form = D('Form'); $data['title'] = 'ThinkPHP'; $data['content'] = '表单内容'; $Form->add($data); 其实thinkphp还支持对象的方式直接向数据库插入数据,如下: $Form = D('Form'); $Form->title = 'ThinkPHP'; $For...
阅读全文
摘要:Html助手 1 .在@app\views\test的index.php中: 'form','class'=>'form','data'=>'myself']);?> 'form-control','placeholder'=>'hehe']);?> 'form-control']);?> 'form-control']);?> ...
阅读全文
摘要:public function actionAjax() { if(isset(Yii::$app->request->post('test'))){ $test = "Ajax Worked!"; // do your query stuff here }else{ $test = "Ajax failed"; /...
阅读全文
摘要:通过传统的form表单提交的方式上传文件: <form id= "uploadForm" action= "http://localhost:8080/cfJAX_RS/rest/file/upload" method= "post" enctype ="multipart/form-data">
阅读全文
摘要:先在配置文件components数组中加上: 'cache'=>array( 'class'=>'CFileCache'), 设置Cache: Yii::app()->cache->set('testcache', array(1,3,4,6));//默认有效期为一年 Yii::app()->cache->set('testcache', array(1,3,4,6), 3600...
阅读全文
摘要:1.问题,项目中上传文件使用插件时,windows上支持函数exif_imagetype(),而在linux上不支持。 2.PHP exif_imagetype的本质 3.解决方案:
阅读全文
摘要:thinkphp整合Auth权限管理、支付宝、微信支付、阿里oss、友盟推送、融云即时通讯、云通讯短信、Email、Excel、PDF等等; 基于thinkphp扩展了大量的功能;而不改动thinkphp核心;非常方便的升级、移植和使用; 来源:https://github.com/baijunya
阅读全文
摘要:目录 1 为什么要用cURL? 2 启用cURL 3 基本结构 4 检查错误 5 获取信息 6 基于浏览器的重定向 7 用POST方法发送数据 8 文件上传 9 cURL批处理(multi cURL) 9.1 WordPress 链接检查器 10 另一些有用的cURL 选项 10.1...
阅读全文
摘要:1.先下载核心文件:https://github.com/fengyuanchen/cropper 2. 3.对于index.html文件 4.对于main.js文件 5.对于crop.php文件
阅读全文
摘要:1.使用的“云之讯”云通讯的接口,注册,登录。 地址:http://www.ucpaas.com/ 2. 3. 4. 5.按规范与实际需求,填写相应的信息,注意要审核通过! 6.核心代码:整合到Vender.如: 7.代码: 8.在config配置文件中做相关的配置; 9.使用与应用 10.测试,成
阅读全文

浙公网安备 33010602011771号