ITeye博客

平时积累

刘逸君 · 共 30 篇文章

[置顶] php生成pdf缩略图

如何让你的php支持pdf生成png缩略图? 1.ubuntu下安装ImageMagick ( http://www.imagemagick.org ) sudo apt-get install imagemagick sudo apt-get install php5-imagick 2.重启apache; sudo /etc/init.d/apache2 restart sudo identify -version 查看版本 查看phpinfo是否已经有了imagick 3.编写函数。 <?php /** * PDF2PNG * @param $pdf 待处理的PDF文件 * @para…

2012-11-01 22:44 · 评论(0)

html转exe桌面文件

最近客户有个要求,要把我们制作的全景看房转换的桌面可执行文件exe,要求可以不用浏览器打开,直接在桌面进行点击,然后运行全景看房。 全景看房说白了也是一个html js 图片包,生成好的文件其实就是个html包,可以用下面的软件进行生成exe 软件界面: 生成后的图标,图标图片可以自定义

2016-06-28 14:54 · 评论(0)

js限制本地上传文件大小(支持ie6,7,8 firefox 谷歌)

<script type="text/javascript"> function onUploadImgChange(fileInput) { var filePath = fileInput.value; var fileExt = filePath.substring(filePath.lastIndexOf(".")) .toLowerCase(); if (!checkFileExt(fileExt)) { alert("您上传的文件不是图片,请重新上传!"); return; } //火狐 if (fileInput.files && fileInput.files[0]) { /…

2013-01-06 11:12 · js · 评论(1)

linux命令

shicd build/ ant updateui 更新前台 netstat -npl|grep 18088 kill 9353 sudo kill -9 30909 ant updateservice 更新后台 cd serivce cd bin ./startup.sh mkdir upload 创建一个文件夹 sudo chown -R www-data:www-data avatar/ 改变文件夹属性 rm -rf 文件夹名 删除文件夹包括 文件夹本身 rm -r * 删除此文件夹下所有的文件 nohup ./start.sh 忽略运行 sudo apt-get install un…

2012-11-06 17:29 · linux · 评论(0)

openstack云平台搭建指南

openstack云平台搭建指南:见附件

2012-11-06 17:28 · linux · 评论(0)

Yii框架--file提交

1.表单文件(本例是_form.php,表单提交页面) <?php $form=$this->beginWidget(‘CActiveForm’, array( ‘id’=>’product-form’, ‘htmlOptions’=>array(‘enctype’=>’multipart/form-data’), ‘enableAjaxValidation’=>false,)); ?>//指定文件上传表单,enctype属性一定是要设置的 <div> <?php echo $form->labelEx($model,’filename’); ?> <?php echo $form->Fil…

2012-11-06 17:28 · php · 评论(0)

redmine安装指南

redmine是一个不错的错误管理工具 给出安装指南

2012-11-05 09:02 · linux · 评论(0)

socket.io不错的websocket

http://socket.io 最近需要做个webim的网页端的在线聊天工具,在网上看到别人写的一个,是用nodejs做服务器端,socket.io用做客户端。真是很简单就是实现一个网页聊天室的效果 <script src="/socket.io/socket.io.js"></script> <script> var socket = io.connect('http://localhost'); socket.on('news', function (data) { console.log(data); socket.emit('my other event', { my: 'data…

2012-11-05 09:02 · js · 评论(0)

js的一个时间控件

http://www.my97.net/ 文档很全,而且是中文的,很是喜欢,虽然还是有点bug 支持的浏览器 IE 6.0+ , Firefox 2.0+ , Chrome, Opera 9.5+ , Safari 3.0+

2012-11-05 09:02 · js · 评论(0)

零碎积累

iframe 中运行父页面的函数---> 一句很有用的话: window.parent.closeIframe(); //closeIframe() 父页面JS函数名 IE下图片刷新---> <img src='http://bbs.blueidea.com/images/blue/reply.gif' align='absmiddle' border='0' alt= "看不清楚?请点击刷新" style="cursor : pointer;" onclick="this.src='http://bbs.blueidea.com/images/blue/reply.gif?' + Math…

2012-11-05 09:01 · php · 评论(0)

一个很不错的js时间的类

/**** Date.prototype.isLeapYear 判断闰年 Date.prototype.Format 日期格式化 Date.prototype.DateAdd 日期计算 Date.prototype.DateDiff 比较日期差 Date.prototype.toString 日期转字符串 Date.prototype.toArray 日期分割为数组 Date.prototype.DatePart 取日期的部分信息 Date.prototype.MaxDayOfDate 取日期所在月的最大天数 Date.prototype.WeekNumOfYear 判断日期所在年的第几周 …

2012-11-05 09:01 · js · 评论(0)

nodejs和redis安装

如果执行下面的node.js安装出现如下错误 /home/vlance/www/node-v0.6.10/wscript:374: error: Could not autodetect OpenSSL support. Make sure OpenSSL development packages are installed. Use configure --without-ssl to disable this message. 执行下面命令 sudo apt-get install libssl-dev ubuntu下安装node.js error could not configure…

2012-11-04 09:03 · linux · 评论(0)

uploadify上传文件插件

一款不错的js+flash的上传文件控件 http://www.uploadify.com/documentation/ 虽然是英文的文档,不过单词比较简单,我竟然都看懂了 $('#'+param.id).uploadify({ //'auto' : false, 'queueID' : queueID, //'debug' : true, //'uploadLimit' : 1, //'buttonClass' : 'some-class', 'removeTimeout' : 1, 'buttonText' : '', 'buttonImage' : buttonImage, //'re…

2012-11-04 09:03 · js · 评论(0)

自己封装的一个juery ajax封装方法

/** * 发送消息方法 * url : /custom/mypassengerssave * josn :{"MyPassengersSaveRequest":"18888888888"}或者"key=a&vlaue=33" * * @param {string} url 适配器URL * @param {object}or{string} json Request参数 * @param {Object} response 回调函数名 * @param {Array} params_array 其他想要传给回调函数的值 ["12",id] * @param {string} type 是否…

2012-11-04 09:03 · js · 评论(0)

jbind ie6下bug解决方法

jbind 在ie6下 <input type="text" value="呵呵"> 生成的时候是: <input type="text" value=呵呵> 所以替换的时候为出现问题,看了下他的源代码,暂时先这样解决,以后好的办法再改进: //ie内核value="{xxx}",实际是value={xxx},“哈哈 看看”只显示“哈哈” return template.replace(new RegExp("value={"+key+"}","ig"),'value="'+data+'"').replace(new RegExp("\{"+key+"\}","ig"),data); 这样的…

2012-11-04 09:02 · js · 评论(0)