function outputCsv($data, $filename = 'file.csv') {//输出文件,下载文件 header('Content-Type:application/force-download'); header("content-Disposition:filename...
分类:
Web程序 时间:
2014-08-27 12:32:57
阅读次数:
191
function deldir($dir) { //先删除目录下的文件: $dh=opendir($dir); while ($file=readdir($dh)) { if($file!="." && $file!="..") { $fullpath=$dir."/".$fi...
分类:
Web程序 时间:
2014-08-27 12:32:07
阅读次数:
213
if (File.Exists(xmlPath + "\\" + xmlName)) //判断文件是否寸在 { //存在的情况下 XmlDocument xmldoc = new XmlDocument(); xmldoc.Load(xmlPath + "\\" + xmlName); /...
分类:
其他好文 时间:
2014-08-27 12:29:17
阅读次数:
214
function Mk_Folder($Folder){ if(!is_readable($Folder)){ Mk_Folder( dirname($Folder) ); if(!is_file($Folder)) mkdir($Folder,0777); }} php递归生...
分类:
Web程序 时间:
2014-08-27 12:24:57
阅读次数:
219
最近脑子不行了,还是记下了吧 1.数据库连接的jdbc url h2分嵌入模式和服务模式,根据不同的模式和情况。连接数据库jdbc url的写法不同 连接内嵌模式的数据库 "jdbc:h2:file:D:/test" ?连接自定目录下的指定数据...
分类:
数据库 时间:
2014-08-27 11:12:38
阅读次数:
241
用OpenSSH在linux下登陆ssh服务器时,每次都提示要输入密码,而且使用vim 的netrw插件编辑远程文件时每次修改后保存都要输密码,非常麻烦。查看了netrw的help文档,发现已经介绍了自动登陆ssh服务器的方法:
1. 创建一个公开/私密钥对(在客户端机器上进行)
ssh-keygen -t rsa
(saving the file in ~/.ssh/id_rsa as pr...
分类:
系统相关 时间:
2014-08-27 11:03:37
阅读次数:
286
void CReadSectorDlg::OnReadButton() { UpdateData (TRUE) ; CFile m_Sector_file ; char * buffer ; if ( m_FileName_str == "") { MessageBox ("Please enter a file to which the read sector contents are...
原理上就是在调用某个方法之前,先做一些事情,比如检查参数什么的,在Dancer中也有这个关键字,可以在request到来的时候,通过检查远程ip来判断是否是非法的ip请求#!/usr/bin/perl# file : before.pl# date : 2014/08/26# author : da...
分类:
其他好文 时间:
2014-08-27 10:47:47
阅读次数:
203
实验02:YUM配置实验目标掌握YUM的配置实验步骤放入RHEL5.9iso,确保电源OK(/misc/cd)客户端配置[root@localhost~]#cd/etc/yum.repos.d/[root@localhostyum.repos.d]#lsrhel-debuginfo.repo[root@localhostyum.repos.d]#cprhel-debuginfo.reporh-server5.9.repo[root@localhost..
分类:
其他好文 时间:
2014-08-27 02:49:47
阅读次数:
255
Ecshop内置了强大的验证码机制,我们只要调用cls_captcha.php这个验证码就可以。
说明一点,当我们使用自己定义的php文件时,我们最好加上IN_ECS 为ture的设置,否则可能抛出Hacker 攻击的错误,下面给出ajax请求验证代码
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/in...
分类:
其他好文 时间:
2014-08-27 00:24:26
阅读次数:
253