解决——Call to undefined function: mcrypt_module_open()

当php的服务器端缺少libmcrypt.dll,使用函数mcrypt_module_open会出现此错误。
在服务器上做如下设置可解决。

下载一个libmcrypt.dll文件

1.将libmcrypt.dll复制到php安装目录下的ext目录下
2.到打开php.ini文件,打开它
3.找到; Directory in which the loadable extensions (modules) reside.
extension_dir = “./”
这两行,要使extension_dir指向的目录下能找到libmcrypt.dll(一般指向php安装目录下的ext目录就OK了)
5.找到;Windows Extensions 项下面的;extension=php_mcrypt.dll这一行,去掉前面的分号注释

Lee dialog 1.0 ie 弹出位置错误解决

Lee dialog 是一个弹出对话框并且背景变暗的jquery差件,但是在ie出弹出的位置出错。以下修改解决了此问题。
  1. // Lee dialog 1.0 http://www.xij.cn/blog/?p=68
  2. var dialogFirst=true;
  3. function dialog(title,content,width,height,cssName,top){
  4. var mytop = top+200;
  5. //alert(mytop);
  6. if(dialogFirst==true){
  7. var temp_float=new String;
  8. temp_float=”<div id=”floatBoxBg” style=”" mce_style=”"”height:”+$(document).height()+”px;filter:alpha(opacity=0);opacity:0;”></div>”;
  9. temp_float+=”<div id=”floatBox” class=”floatBox” style=”" mce_style=”"”top:”+mytop+”px;”>”;
  10. temp_float+=”<div class=”title”><h4></h4><span>关闭</span></div>”;
  11. temp_float+=”<div class=”content”></div>”;
  12. temp_float+=”</div>”;
  13. $(“body”).append(temp_float);
  14. dialogFirst=false;
  15. }
  16. $(“#floatBox .title span”).click(function(){
  17. $(“#floatBoxBg”).animate({opacity:”0″},”normal”,function(){$(this).hide();});
  18. $(“#floatBox”).animate({top:($(document).scrollTop()-(height==”auto”?300:parseInt(height)))+”px”},”normal”,function(){$(this).hide();});
  19. });
  20. $(“#floatBox .title h4″).html(title);
  21. contentType=content.substring(0,content.indexOf(“:”));
  22. content=content.substring(content.indexOf(“:”)+1,content.length);
  23. switch(contentType){
  24. case ”url”:
  25. var content_array=content.split(“?”);
  26. $(“#floatBox .content”).ajaxStart(function(){
  27. $(this).html(“loading…”);
  28. });
  29. $.ajax({
  30. type:content_array[0],
  31. url:content_array[1],
  32. data:content_array[2],
  33. error:function(){
  34. $(“#floatBox .content”).html(“error…”);
  35. },
  36. success:function(html){
  37. $(“#floatBox .content”).html(html);
  38. }
  39. });
  40. break;
  41. case ”text”:
  42. $(“#floatBox .content”).html(content);
  43. break;
  44. case ”id”:
  45. $(“#floatBox .content”).html($(“#”+content+”").html());
  46. break;
  47. case ”iframe”:
  48. $(“#floatBox .content”).html(“<iframe src=”" mce_src=”"”"+content+”" width=”100%” height=”"+(parseInt(height)-30)+”px”+”" scrolling=”auto” frameborder=”0″ marginheight=”0″ marginwidth=”0″></iframe>”);
  49. }
  50. $(“#floatBox”).css(“top”,$(document).scrollTop());//—–fanfan add 20091006
  51. $(“#floatBox”).css(“display”,”block”);//—–fanfan add 20091006
  52. $(“#floatBoxBg”).show();
  53. $(“#floatBoxBg”).animate({opacity:”0.5″},”normal”);
  54. $(“#floatBox”).attr(“class”,”floatBox ”+cssName);
  55. //$(“#floatBox”).css({display:”block”,left:(($(document).width())/2-(parseInt(width)/2))+”px”,top:($(document).scrollTop()-(height==”auto”?300:parseInt(height)))+”px”,width:width,height:height});//—–the origin
  56. $(“#floatBox”).animate({top:($(document).scrollTop()+50)+”px”},”normal”);
  57. }