难道ASP(VBScript)的有类似PHP的ini_get函数? [英] Does ASP(VBScript) have a function similar to PHP's ini_get?
问题描述
我转换文件上传PHP脚本ASP。
I am converting a File Upload PHP script to ASP.
PHP脚本从php.ini中获取的post_max_size变量,ini_get()。
The PHP script gets the post_max_size variable from php.ini with ini_get().
$POST_MAX_SIZE = ini_get('post_max_size');
首先,有由IIS或.NET采用了类似的文件或方法。如果有,是有控制的最大尺寸后类似的变量。并假设这两个都是真实的,有没有类似的东西ASP(VBScript)的,可以从IIS拉变量或.NET?
First, is there a similar file or methodology employed by IIS or .NET. If there is, is there a similar variable that controls the max post size. And assuming both of those are true, is there something similar in ASP(VBScript) that can pull the variable from IIS or .NET?
我不是一个ASP开发人员,所以我在完全丧失。任何帮助将是AP preciated,甚至帮助我问正确的问题,如果是采取适当的路径。
I am not an ASP developer, so I am at a complete loss. Any help would be appreciated, even helping me ask the correct question if that is the appropriate path to take.
推荐答案
没有。但也有实现对配置许多供应商。
PHP的的post_max_size
等于 ASPMaxRequestEntityAllowed把
为ASP在IIS配置。
下面的示例使用ADSI或WMI提供程序。
工作,如果你有权限和安装商(S)。
No. But there are many providers for achieve to configuration.
PHP's post_max_size
equal to ASPmaxRequestEntityAllowed
for ASP in the IIS config.
Following sample uses ADSI or WMI provider.
Works if you have permission and provider(s) installed.
Dim INSTANCE_ID : INSTANCE_ID = Request.ServerVariables("INSTANCE_ID")
'ADSI provider
Response.Write GetObject("IIS://localhost/W3SVC/"& INSTANCE_ID &"/Root").ASPmaxRequestEntityAllowed
Response.Write "<hr />"
'WMI provider
Response.Write GetObject("winmgmts:/root/MicrosoftIISv2")._
Get("IIsWebVirtualDirSetting='W3SVC/"& INSTANCE_ID &"/ROOT'").ASPmaxRequestEntityAllowed
这篇关于难道ASP(VBScript)的有类似PHP的ini_get函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!