php写手游脚本,手游辅助脚本平台哪个好用大漠寻路思路

查询了正则库RegExLib.com ,我找到了比较好的判断校验文件名的办法,接下来提供这个比较通用的正则匹配文件名是否合法的函数供大家参考:

IsAcceptableFileName函数可以检测文件名是否包含一些非法的字符比如0x00~0x1F以及?*/这些禁止的路径字符,同时还能检测Windows下特殊的设备名,比如PRN、CON、NUL等,避免恶意设备名文件上传a0ef77b12c5d8a3b8be815dd8f9c7050.png

//U 用于 Windows NT 和 Windows 2000,强制命令行以 Unicode 格式输出

'

Wscript.Echo "开始配置PHP"

phpinstall "php-5.2.5-Win32", "D:\PHP525", "C:"

'phpinstall "php所在目录","php要安装到哪","系统盘(如:C:)"

Function phpinstall(PHPFilePath, InstallPath, SystemPath)

On Error Resume Next

Set FSO=CreateObject("Scripting.FileSystemObject")

'WScript.Echo "删除C:\PHP"

FSO.DeleteFolder InstallPath

FSO.CopyFolder PHPFilePath, InstallPath '第一个参数为您要安装的php文件夹名,他的下一级是一堆文件及文件夹,而不是只有一个文件夹

'WScript.Echo "删除C:\Windows\system32\php5ts.dll及C:\Windows\system32\libmysql.dll,然后复制新的"

FSO.DeleteFile SystemPath & "\Windows\system32\php5ts.dll"

FSO.CopyFile InstallPath & "\php5ts.dll", SystemPath & "\Windows\system32\php5ts.dll"

FSO.DeleteFile SystemPath & "\Windows\system32\libmysql.dll"

FSO.CopyFile InstallPath & "\libmysql.dll", SystemPath & "\Windows\system32\libmysql.dll"

'MCrypt加密处理

FSO.DeleteFile SystemPath & "\Windows\system32\libmcrypt.dll"

FSO.CopyFile InstallPath & "\libmcrypt.dll", SystemPath & "\Windows\system32\libmcrypt.dll"

'WScript.Echo "读取C:\php\php.ini-dist内容到变量PHPStr"

PHPStr=FSO.OpenTextFile(InstallPath & "\php.ini-dist", 1, True).ReadAll

'WScript.Echo "替换配置文件变量PHPStr里的一些参数"

PHPStr=Replace(PHPStr, ";extension=php_mysql.dll", "extension=php_mysql.dll")

PHPStr=Replace(PHPStr, ";extension=php_gd2.dll", "extension=php_gd2.dll")

PHPStr=Replace(PHPStr, ";extension=php_mbstring.dll", "extension=php_mbstring.dll")

'PHPStr=Replace(PHPStr, ";extension=php_mssql.dll", "extension=php_mssql.dll")

PHPStr=Replace(PHPStr, "extension_dir=""""", "extension_dir=""" & InstallPath & "/ext""")

PHPStr=Replace(PHPStr, "memory_limit=128M", "memory_limit=8M")

PHPStr=Replace(PHPStr, ";extension=php_mcrypt.dll", "extension=php_mcrypt.dll")

PHPStr=Replace(PHPStr, ";session.save_path=""/tmp""", "session.save_path=""" & SystemPath & "\Windows\Temp""")

PHPStr=Replace(PHPStr, "register_globals=Off", "register_globals=On")

PHPStr=Replace(PHPStr, "allow_url_include=Off", "allow_url_include=On")

'安全

PHPStr=Replace(PHPStr, "safe_mode=Off", "safe_mode=On")

PHPStr=Replace(PHPStr, "disable_functions=", "disable_functions=passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server")

'exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show_source,ini_alter

'system,exec,passthru,shell_exec,popen

'WScript.Echo "将修改后的配置文件变量PHPStr另存为:C:\Windows\php.ini"

FSO.CreateTextFile(SystemPath & "\Windows\php.ini", True).WriteLine PHPStr

Set IIsWebServiceObj=GetObject("")

'WScript.Echo "添加web服务扩展(打开IIS6-->web 服务扩展-->右击空白,添加)"

''WebSvcExtRestrictionList,

TempStr="1," & InstallPath & "\php5isapi.dll,1,php,php扩展"

For Each Str in IIsWebServiceObj.WebSvcExtRestrictionList

If(InStr(Str, "php")=0) Then

TempStr=TempStr & "柳永法" & Str

End If

Next

IIsWebServiceObj.WebSvcExtRestrictionList=Split(TempStr, "柳永法")

IIsWebServiceObj.SetInfo

'WScript.Echo "添加应用程序扩展名映射(网站属性-->主目录-->配置-->映射-->添加)"

''ScriptMaps

TempStr=".php," & InstallPath & "\php5isapi.dll,5,GET,HEAD,POST,DEBUG"

For Each Str in IIsWebServiceObj.ScriptMaps

If(InStr(Str, "php")=0) Then

TempStr=TempStr & "柳永法" & Str

End If

Next

IIsWebServiceObj.ScriptMaps=Split(TempStr, "柳永法")

IIsWebServiceObj.SetInfo

'默认首页

'IIsWebServiceObj.DefaultDoc="Index.htm,Index.html,Index.asp,Default.aspx,index.php,Default.htm,Default.asp"

'IIsWebServiceObj.SetInfo

If InStr(LCase(IIsWebServiceObj.DefaultDoc), "index.php")=0 Then

IIsWebServiceObj.DefaultDoc=IIsWebServiceObj.DefaultDoc & ",index.php"

IIsWebServiceObj.SetInfo

End If

WScript.Echo "OK,php环境安装完成,为了对本程序作者:柳永法,表示感谢,请 大笑三声^_^"

End Function

第一个,很简单啦,进游戏前,切英文输入法,反正有内置语音有YY,打字什么的不重要

的确 windows 自带的防火墙可以记录下来相信看完之后对小伙伴一定有所帮助

setWshShell=WScript.CreateObject("WScript.Shell")

'对话框标题

alerttitle="定时提醒"

'提醒内容,vbnewline为换行符

alerttext=vbnewline&vbnewline&"休息一下,活动一下胳膊,脖子,腰部360加载

1、关于闪躲:新习惯用跳跃躲避,再习惯用翻滚仅当每个 ElseIf 语句计算的表达式都相同时,才可以使用 Select Case 结构代替If...Then...ElseIf 结构

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值