php咋实现本地存数据,php中实现数据存储在excel

function detectMacXFF() {var userAgent = navigator.userAgent.toLowerCase();if(userAgent.indexOf("mac") != -1 && userAgent.indexOf("firefox") != -1) {return true;}}function in_array(needle, haystack) {if(typeof needle =="string" ||typeof needle =="number") {for(var iin haystack) {if(haystack[i] == needle) {return true;}}}return false;}function sd_load(sd_width) {if(sd_width) {$("#SD_window").css("width", sd_width +"px");}var sd_top = ($(window).height() - $("#SD_window").height()) / 2 + $(document).scrollTop();if(sd_top < 0) {sd_top = 0;}var sd_left = ($(window).width() - $("#SD_window").width()) / 2;if(sd_left < 0) {sd_left = 0;}$("#SD_window").css("top", sd_top);$("#SD_window").css("left", sd_left);}function sd_remove() {$("#SD_close,#SD_cancel,#SD_confirm").unbind("click");$("#SD_window,#SD_overlay,#SD_HideSelect").remove();if(typeof document.body.style.maxHeight =="undefined") {$("body","html").css({height:"auto", width:"auto"});}}function showDialog(mode, msg, t, sd_width) {var sd_width = sd_width ? sd_width : 400;var mode = in_array(mode, ['confirm','window','info','loading']) ? mode :'alert';var t = t ? t :"提示信息";var msg = msg ? msg :"";var confirmtxt = confirmtxt ? confirmtxt :"确定";var canceltxt = canceltxt ? canceltxt :"取消";sd_remove();try {if(typeof document.body.style.maxHeight ==="undefined") {$("body","html").css({height:"100%", width:"100%"});if(document.getElementById("SD_HideSelect") ===null) {$("body").append("

";SD_html +="

" + t +"

";SD_html +="
" + msg +"
";SD_html +="
";SD_html +=" " + confirmtxt +"";SD_html +=" " + canceltxt +"";SD_html +="
";SD_html +="";SD_html +="
";$("#SD_window").append(SD_html);$("#SD_confirm,#SD_cancel,#SD_close").bind("click",function(){sd_remove();});if(mode =="info" || mode =="alert") {$("#SD_cancel").hide();$("#SD_button").show();}if(mode =="window") {$("#SD_close").show();}if(mode =="confirm") {$("#SD_button").show();}var sd_move =false;var sd_x, sd_y;$("#SD_container > h3").click(function(){}).mousedown(function(e){sd_move =true;sd_x = e.pageX - parseInt($("#SD_window").css("left"));sd_y = e.pageY - parseInt($("#SD_window").css("top"));});$(document).mousemove(function(e){if(sd_move){var x = e.pageX - sd_x;var y = e.pageY - sd_y;$("#SD_window").css({left:x, top:y});}}).mouseup(function(){sd_move =false;});$("#SD_body").width(sd_width - 50);sd_load(sd_width);$("#SD_window").show();$("#SD_window").focus();}catch(e) {alert("System Error !");}}function showInfo(msg, fn, timeout) {showDialog("info", msg);$("#SD_confirm").unbind("click");if(fn && timeout) {st = setTimeout(function(){sd_remove();fn();}, timeout * 1000);}$("#SD_confirm").bind("click",function(){if(timeout) {clearTimeout(st);}sd_remove();if(fn) {fn();}});}function showWindow(title, the_url, sd_width) {var sd_width = sd_width ? sd_width : 400;$.ajax({type        :"GET",dataType    :"html",cache       :false,timeout     : 10000,url         : the_url,data        :"isajax=1",success     :function(data){showDialog("window", data, title, sd_width);},error       :function(data){showDialog("alert","读取数据失败");},beforeSend  :function(data){showDialog("loading","正在读取数据...");}});}function showConfirm(msg, fn) {showDialog("confirm", msg);$("#SD_confirm").unbind("click");$("#SD_confirm").bind("click",function(){if(fn) {fn();}});}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值