最近项目中需要实现两台异地服务器图片同步,于是就开始查资料寻找合适的方法或者软件,其中在一篇文章中提到一个软件,WebSynchronizer,介绍是这样的:
档案同步化工具 - WebSynchronizer,由知名续传软件 ReGet 之软件出版公司所推出,是网站同步化、档案镜像、档案备份的绝佳工具,可以执行下列主要工作:
1) 本机资料夹及远程资料夹的同步化;
2) 两台远程计算机中的资料夹同步化;
3) 两个本机资料之同步化。
看介绍正好符合我的需求,于是便搜索这个软件,在BAIDU上搜索的都是1.3版本的,而且非开源软件,这个可愁了,现在不可能花钱去购买软件的,只能再找, 看看有没有破解版本的,结果中文搜索结果都没有破解的,于是又转向GOOGLE,结果不经意之间发现了WebSynchronizer1.5版,而且还有开源代码,难道是免费的?我赶紧下载下来,安装,一路下来也没有提示要输入序列号,就这样安装好了,真是喜出望外,后来看了一下更新日志,原来到1.5版本这个项目转成开源的了:
Current version: WebSynchronizer 1.5 (build 162)
Build 162 / 09 Jan
WebSynchronizer moved to open source
不错不错,界面好,设置简单,功能强大,绝对的好东西啊!
Read the rest of this entry »
这次修改的更新主要是增加了对保存目标路径的判断,如果不存在,就自动生成,SavePath的参数支持相对路径和绝对路径
uploadclass
下面把代码贴出来
‘———————————————————-
‘**************** 风声无组件上传类 2.11 *****************
‘作者:风声
‘网站:http://www.fonshen.com
‘邮件:webmaster@fonshen.com
‘版权:版权全体,源代码公开,各种用途均可免费使用
‘修改:迦
‘网站:http://www.ishere.cn | http://www.aobodo.com
‘说明:SavePath参数支持相对与绝对两种路径,并自动生成目标文件夹
‘**********************************************************
‘———————————————————-
Class UpLoadClass
Private m_TotalSize,m_MaxSize,m_FileType,m_SavePath,m_AutoSave,m_Error,m_Charset
Private m_dicForm,m_binForm,m_binItem,m_strDate,m_lngTime
Private m_Fso,astrPath, ulngPath, i, strTmpPath
Public FormItem,FileItem
Public Property Get Version
Version=”Fonshen UpLoadClass Version 2.11″
End Property
Read the rest of this entry »
- /*
- Correctly handle PNG transparency in Win IE 5.5 & 6.
- Copyright 2007 Ignia, LLC
- Based in part on code from from http://homepage.ntlworld.com/bobosola.
- Edit: Jena.want
- Date: 2008.11.30
- Web: www.AOBODO.com | www.IsHere.cn
-
- Use in with DEFER keyword wrapped in conditional comments:
- <!--[if lt IE 7]>
- <mce:script defer type="text/javascript" src="pngfix.js" mce_src="pngfix.js"></mce:script>
- <![endif]-->
- */
-
- (function fixPng() {
- var arVersion = navigator.appVersion.split("MSIE")
- var version = parseFloat(arVersion[1])
-
- if ((version >= 5.5 && version < 7.0) && (document.body.filters)) {
- for(var i=0; i
- var img = document.images[i];
- var imgName = img.src.toUpperCase();
- if (imgName.indexOf(".PNG") > 0) {
- var width = img.width;
- var height = img.height;
- var sizingMethod = (img.className.toLowerCase().indexOf("scale") >= 0)? "scale" : "image";
- img.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + img.src.replace('%23', '%2523').replace("'", "%27") + "', sizingMethod='" + sizingMethod + "')";
- img.src = "images/blank.gif";
- img.width = width;
- img.height = height;
- }
- }
- }
- })();
这是打好包的文件,需要的朋友可以下载试试。msiepng
另外,如果PNG图片做背景的话,在IE6下也会出现不透明情况,以上脚本只解决了页面中的PNG图片透明,如果是CSS样式中使用了透明的PNG图片,则可以使用以下方案解决透明问题,利用了只有 IE6 才识别的下划线(_),来定义 IE6 浏览器中的滤镜:
- #png {
- background: url(绝路径/images/bg.png) repeat;
- _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='scale', src="绝路径/images/bg.png");
- _background:none;
- }

buy.maimaij.com
Buy.MaiMaiJ.com is a professional wholesale website in China, dedicating itself to build a worldwide wholesale shop online.
Our site is aiming to operate the B-to-C transactions with consumers from all over the world. The biggest superiority of our site is applying the system MaiMaiJ (http://www.MaiMaiJ.com), It can provide global sellers and buyers with easier methods for processing and managing wholesale orders.
Our slogan is “Buy Wholesale Products from Chinese Wholesaler”, using Buy.MaiMaiJ.com, the buyers can submit orders online and the sellers manage orders easily, without handwork, Emails and Faxes.
You can get what you like on this website at wholesale prices. We sell a vast range of merchandise produced exclusively by Chinese manufacturers. If you like to hunt for something special at low price by fashionable online shopping, then use Buy.MaiMaiJ.com to purchase various kinds products you are interested in.
http://buy.maimaij.com/links.html
http://buy.maimaij.com/links-add.html
- <br />
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br />
- <html xmlns="http://www.w3.org/1999/xhtml"><br />
- <head><br />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
-
- </head>
-
-
- <body><br />
- <script type="text/javascript">
- /*
- * author:Jena.want
- * web:www.AOBODO.com
- * last edit:2008.11.11
- * 谨以此送给正在享受光棍节的哥们们!祝今年节日快乐!祝明年不再过此节!
- */
- //<![data[
- checkInstalled = function(m) {
- switch(m){
- case 'msn':
- try {
- new ActiveXObject("MSNMessenger.P4QuickLaunch");
- return true;
- }
- catch (e) {
- return false;
- }
- case 'skype':
- try{
- new ActiveXObject("Skype.Detection");
- return true;
- }catch(e){
- return false;
- }
- case 'qq':
- try {
- new ActiveXObject("TimwpDll.TimwpCheck");
- return true;
- }
- catch (e) {
- return false;
- }
- }
- }
-
-
- //]]-->
- </script>
-
- <input type="button" value="检测有没有安装MSN" onclick="alert(checkInstalled('msn'))" />
- <input type="button" value="检测有没有安装QQ" onclick="alert(checkInstalled('qq'))" />
- <input type="button" value="检测有没有安装SKYPE" onclick="alert(checkInstalled('skype'))" />
- </body><br />
- </html><br />
测试环境:WIN SERVER 2008,IE6+,Firefox2.0+,Opera,Chorme
PclZip介绍
PclZip library能够压缩与解压缩Zip格式的压缩档(WinZip、PKZIP);且能对此类类档案进行处理,包括产生压缩档、列出压缩档的内容以及解压缩档案等等。由于能够在伺服器端进行压缩与解压缩的动作,所以相当方便使用。
PclZip定义一个PclZip类别,其类别物件可视为一个ZIP档案,亦提供method来进行处理。
如何使用PclZip
1.基础
所有的功能都由pclzip.lib.php这个档案提供,PclZip library可于其首页(www.phpconcept.net/pclzip/index.en.php)下载,(PS:但是目前打不开了,我上传了一个文件class-pclzip)。所有的PKZIP档案其实就是一个 PclZip的类别物件。当产生一个PclZip档案(ie, PclZip类别物件),就会先产生一个压缩档,且档名已经指定,但此压缩档的内容尚未存在:
- < ?PHP
- require_once('pclzip.lib.php');
- $archive = new PclZip("archive.zip");
- ?>
此物件提供了一些public method可用来处理此档案。
Read the rest of this entry »
以前的程序是把图片通过ASP以二进制的格式存储到MSSQLSERVER中的,现在需要用PHP把它显示出来,
- $id = $_GET['id'];
- $conn = dbo_connect();
- $query = "select f.Data from Files f,Products p where p.PhotoSN=f.SN and p.ID=$id";
- $result = mssql_query($query, $conn);
- if (mssql_num_rows($result)) {
- $row = mssql_fetch_assoc($result);
- if (!empty($row['Data'])) {
- echo $row['Data'];
- }
- }
- mssql_close($conn);
但是读取出来的图片都只有开头一小部分,其它部分是空白,全选以后看到的图片大小似乎也是正常的,就是有一部分显示不出来,好一个纳闷。质量高的图片显示的部分还要小,质量低的或者图片尺寸小的就要显示的多一些,看样子是读取的数据大小是一致的。后来一看$row['Data']的长度,果然清一色的4096,原来如此。
上网查资料,费了好大劲,才看到一句有价值的话“是配置错了”。配置错了?难道PHP读取MSSQL的image数据还有大小限制?赶紧打开php.ini,搜索image,没有相关的,搜索4096,还没有相关的,不会吧?!哈哈,原来是已经搜索到文件末尾,还在向下搜索,难怪没有。赶紧改方向,找到了!但是无关,再搜,OK,终于找到了:
- ; Valid range 0 - 2147483647. Default = 4096.
- ;mssql.textlimit = 4096
-
- ; Valid range 0 - 2147483647. Default = 4096.
- ;mssql.textsize = 4096
原来如此,把mssql.textlimit和mssql.textsize后面的值都改成最大,2147483647,然后再把前面的分号去掉,保存,重启IIS。再去看刚才的程序显示出来的图片,成了,全部显示!
真亲啊!GOOD!