存档

‘Share(分享)’ 分类的存档

    看了网上介绍的硬盘安装CentOS的文章,我也要试验一下。为了挑战难度,我准备以http方式安装。现在已经成功,主要操作步骤如下:
     1、U盘,32MB。我想没有比我这个更小把。安装好一键Ghost U盘版本。并修改GRUB的配置文件,将password一行去掉。
     2、电脑两台,一台裸机,一台装好Win2003的电脑,两台电脑通过switch相连
     3、在Windows 2003的电脑上装好IIS,并将CentOS包解压,通过http://10.0.0.254/install-centos/访问。
     4、裸机开机,U盘引导,进入GRUB菜单,c进入命令行,按提示输入:
grub>root (hd0,0) 
grub>kernel /vmlinuz
grub>initrd /initrd.img
grub>boot
     5、进入系统,等待,选择HTTP模式(FTP模式基本一样),按网络环境输入配置(dhcp模式我没有成功,我的win2003的dhcp是开着的)。如我的给他新配的ip  10.0.0.123。其他随便填,一个局域网的。
     6、填写http地址,我这里是10.0.0.254。路径是install-centos。下面按提示操作就可以了。很简单把。
    和硬盘光盘安装最大的不同,就是http方式不能用鼠标操作。总之没有硬盘光盘安装方便。可能是考虑到网速的原因把,值得一提的是。通过局域网方式安装,比硬盘速度块。

六 19th, 2010 | Filed under Linux, Share(分享)

本程序是一款ASP+Access开发的小巧的URL转发系统
被A5,cnzz,中国站长网收录,继续努力,最近准备再发一套门诊病例系统。
下载包仅22KB左右。功能涵盖了添加新业务,到期自动关闭
设定域名转发等功能。
请修改#/inc.asp中masterWeb为您的管理地址。
管理员:local 密码:admin
说明地址:http://www.myw3.cn/myDevise/Url/
站长网下载地址:http://down.chinaz.com/soft/27254.htm
CNZZ下载地址:http://down.cnzz.cn/info/56473.aspx
A5下载地址:http://down.admin5.com/code_asp/59096.html

六 17th, 2010 | Filed under Share(分享)

本文为catseven落伍缩写,已发到落伍者,供catseven落伍。如有引用,请注明出处。
       因为工作,经常要操作数据库,考虑到安全问题,在防火墙中没有开mssql端口。每次遇到必须使用查询分析器的时候,就麻烦了。为了方便工作,写了这个工具。
      可以操作所有ADODB连接的数据库,当然包括MSSQL,MySQL,Access….

     本工具分为两个部分。控制代码和输入代码。
     控制代码就是VBScript部分,可以实现所有逻辑操作,和asp操作一样。
      输入部分就是Link、SQL分别用于输入连接字符串,SQL语句。如果控制代码不调用这些语句,则这部分无实际意义。
       默认,控制代码已经写好一个模板。点击执行,可以执行SQL语句,点击下载,将执行结果保存到Excel中。
       因为能直接操作VbScript,如果要使用,请设置好权限。新建mssql用户,在iis中设置mssql.asp以mssql的身份执行。mssql.asp的访问权限只有mssq用户。mssql对所有文件无任何权限,对mssql.asp只有可读权限。
      代码如下:

<%
Server.ScriptTimeout = 9999
starttime = timer()
cmd = request("cmd")

if request("out")="xls" and trim(cmd)<>"" then
response.ContentType = "application/octet-stream"
response.AddHeader "Content-Disposition", "attachment;filename=执行结果.xls"
execute(cmd)
response.end
end if
%>
<style type="text/css">
form{text-align:center}
textarea{width:100%;height:200px;border:solid 1px #CCC;}
input{height:20px;vertical-align:middle}
input.input{border:solid 1px #CCC;width:40%;line-height:18px;color:#090}
a{font-size:12px;color:#C00;text-decoration:none;}
</style>
<form action="mssql.asp" method="post">
<textarea name="cmd">
<%
if trim(cmd)="" then
%>set Conn = Server.CreateObject("ADODB.Connection")
Conn.open Request("link")

Set Rs=Conn.Execute(Request("sql"))
for i = 0 to Rs.Fields.Count-1
[...]

六 12th, 2010 | Filed under ASP, Share(分享), Show(展示), Thinks(想法)

< %
set FSO = Server.CreateObject("Scripting.FileSystemObject")

Function CheckFile(byval Path)
pathArr = Split(Path,"/")
Path = replace(Path,"/" & pathArr(ubound(pathArr)),"")
if Path = "" then Exit Function
if not FSO.FolderExists(Server.Mappath(Path)) then
Call CheckFile(Path)
FSO.CreateFolder(Server.Mappath(Path))
end if
End Function

Function newFile(byval Path)
if Right(Path,1)="/" then
Path = Path & "index.html"
end if
Call CheckFile(Path)
Set newFile = FSO.CreateTextFile(Server.Mappath(Path))
End Function

set n = newFile("/index/cat2/path/demo/111/222/333/444/555/666/777/888/")
n.write "12345"
n.close
set n = nothing

set n = newFile("../../../../test.css")
n.write "body{}"
n.close
set n = nothing
%>

六 2nd, 2010 | Filed under ASP, Share(分享), Show(展示), Thinks(想法)

ASP模板技术探讨之关联变量。
先看可实现的效果:
访问变量,需要与ASP结合
关联变量:支持关联的变量
{$#关联名#}
Assgin #关联名#,#变量#
{$#关联名#}
{$#关联名#.#索引#}
Assgin #关联名#,Array(“123″)
{$#关联名#.0}
{$#关联名#.#索引#.#索引#}
Assgin #关联名#,Array(Array(“123″))
{$#关联名#.0.0}
{$#关联名#.#索引#…..#索引#}
Assgin #关联名#,Array(Arr..ay(“123″)))
{$#关联名#.0…0}
{$#关联名#.#Directionary.Key#}
Assgin #关联名#,#DirectionaryName#
{$#关联名#.#Directionary.Key#}

<%
Dim outHtml
outHtml = "xxx" ‘加载模板
function Assign(t,n)
if isArray(n) then
for x=0 to ubound(n)
Assign t&"."&x,n(x)
next
elseif isobject(n) then
for each x in n
Assign t&"."&x,n.item(x)
next
else
if isnull(n) then
outHtml=replace(outHtml,"{$"&t&"}","")
else
outHtml=replace(outHtml,"{$"&t&"}",n)
end if
end if
end function
%>

六 1st, 2010 | Filed under ASP, Share(分享), Thinks(想法)
标签:

JS有Base64.js,PHP内建Base64支持,ASP处理Base64数据就没有那么幸运了,既没有Base64.asp,也没有内建的函数,这可怎么办?
ASP一般用到Base64的时候,都是处理二进制文件。简单的文本,就没有必要编码咯。ASP处理二进制又是一个弱项,有没有好的方法呢?xml中的bin.base64也许可以拿来用用。

‘调用xml的编码,用于参照
function Base64Encode(strData)
dim objAds,objXd
set objAds=createobject("adodb.stream")
objAds.Type=2
objAds.charset="unicode"
objAds.mode=3
call objAds.open()
objAds.writeText strData
objAds.Position=0
objAds.Type=1
‘objAds.Position=2

set objXd=createobject("msxml.domdocument")
call [...]

五 22nd, 2010 | Filed under ASP, Share(分享)