类型不匹配:'[string:""]' [英] Type mismatch: '[string: ""]'
问题描述
大家好,
为什么我收到此错误..?干杯。
Mark Sargent。
错误类型:
Microsoft VBScript运行时(0x800A000D)
类型不匹配:''[string:""]''
/Classifieds/ClassifiedImageResize.asp,第27行
<%
''创建AspJpeg实例
设置Jpeg = Server.CreateObject(" Persits.Jpeg")
''计算路径到源图像
Path = Server.MapPath(FilePath)
''开源图片
Jpeg.Open Path
''创建AspUpload对象的实例
设置Upload = Server.CreateObject(" Persits.Upload")
''减少图像尺寸%
((***第27行***))Jpeg.Width = Jpeg.OriginalWidth * Upload.Form(" scale")/
100
Jpeg.Height = Jpeg.OriginalHeight * Upload.Form(" scale)/ 100
''必要时应用锐化
''Jpeg.Shar pen 1,130
''创建缩略图并将其保存到磁盘
FilePath =替换(FilePath," /"," \" ;)
FilePath =替换(FilePath," ImageUploads \","")
Jpeg.Save Server.MapPath(" ImageUploads\Thumbs" ;)& " \Thumb" &安培; FilePath
%>
Hi All,
why am I getting this error..? Cheers.
Mark Sargent.
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: ''[string: ""]''
/Classifieds/ClassifiedImageResize.asp, line 27
<%
'' Create instance of AspJpeg
Set Jpeg = Server.CreateObject("Persits.Jpeg")
'' Compute path to source image
Path = Server.MapPath(FilePath)
'' Open source image
Jpeg.Open Path
'' Create an instance of AspUpload object
Set Upload = Server.CreateObject("Persits.Upload")
'' Decrease image size by %
((***Line 27***)) Jpeg.Width = Jpeg.OriginalWidth * Upload.Form("scale") /
100
Jpeg.Height = Jpeg.OriginalHeight * Upload.Form("scale") / 100
'' Apply sharpening if necessary
'' Jpeg.Sharpen 1, 130
'' create thumbnail and save it to disk
FilePath = Replace(FilePath, "/", "\")
FilePath = Replace(FilePath, "ImageUploads\", "")
Jpeg.Save Server.MapPath("ImageUploads\Thumbs") & "\Thumb" & FilePath
%>
推荐答案
第27行是什么以及有问题的变量的response.write是什么< br $> b $ b收益率?
雷在家
" Mark Sargent" <做********* @ hotmail.com>写在消息
新闻:OX ************** @ TK2MSFTNGP09.phx.gbl ...
What is line 27 and what does a response.write of the variables in question
yield?
Ray at home
"Mark Sargent" <do*********@hotmail.com> wrote in message
news:OX**************@TK2MSFTNGP09.phx.gbl...
大家好,
为什么我收到此错误..?干杯。
Mark Sargent。
错误类型:
Microsoft VBScript运行时(0x800A000D)
类型不匹配:''[string:"" ]''
/Classifieds/ClassifiedImageResize.asp,第27行
<%
''创建AspJpeg实例
设置Jpeg = Server.CreateObject(" Persits.Jpeg
''计算源图像的路径
Path = Server.MapPath(FilePath)
''开源图片
Jpeg 。打开路径
''创建AspUpload对象的实例
设置Upload = Server.CreateObject(" Persits.Upload")
''''减小图像大小by%
((*** Line 27 ***))Jpeg.Width = Jpeg.OriginalWidth * Upload.Form(" scale")/
100
Jpeg.Height = Jpeg .OriginalHeight * Upload.Form(" scale)/ 100
''必要时应用锐化
''Jpeg.Sharpen 1,130
''创建缩略图并将其保存到磁盘
FilePath = R. eplace(FilePath," /"," \")
FilePath = Replace(FilePath," ImageUploads \","")
Jpeg.Save Server.MapPath (ImageUploads\Thumbs)& " \Thumb" &安培; FilePath
%>
Hi All,
why am I getting this error..? Cheers.
Mark Sargent.
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: ''[string: ""]''
/Classifieds/ClassifiedImageResize.asp, line 27
<%
'' Create instance of AspJpeg
Set Jpeg = Server.CreateObject("Persits.Jpeg")
'' Compute path to source image
Path = Server.MapPath(FilePath)
'' Open source image
Jpeg.Open Path
'' Create an instance of AspUpload object
Set Upload = Server.CreateObject("Persits.Upload")
'' Decrease image size by %
((***Line 27***)) Jpeg.Width = Jpeg.OriginalWidth * Upload.Form("scale") /
100
Jpeg.Height = Jpeg.OriginalHeight * Upload.Form("scale") / 100
'' Apply sharpening if necessary
'' Jpeg.Sharpen 1, 130
'' create thumbnail and save it to disk
FilePath = Replace(FilePath, "/", "\")
FilePath = Replace(FilePath, "ImageUploads\", "")
Jpeg.Save Server.MapPath("ImageUploads\Thumbs") & "\Thumb" & FilePath
%>
Upload.Form(" scale")可能不是数字,因此对一个数字的隐含
强制失败。
尝试调试并找出这个值返回的内容。
Chris。
" Mark Sargent" <做********* @ hotmail.com>在消息中写道
新闻:OX ************** @ TK2MSFTNGP09.phx.gbl ...
大家好,
为什么我收到此错误..?干杯。
Mark Sargent。
错误类型:
Microsoft VBScript运行时(0x800A000D)
类型不匹配:''[string:""]''
/Classifieds/ClassifiedImageResize.asp,第27行
<%
''创建AspJpeg实例
设置Jpeg = Server.CreateObject(" Persits.Jpeg")
''计算路径到源图像
Path = Server.MapPath(FilePath)
''开源图片
Jpeg.Open Path
''创建AspUpload对象的实例
设置Upload = Server.CreateObject(" Persits.Upload")
''减少图像尺寸%
((***第27行***))Jpeg.Width = Jpeg.OriginalWidth * Upload.Form(" scale")/
100
Jpeg.Height = Jpeg.OriginalHeight * Upload.Form(" scale)/ 100
''必要时应用锐化
''Jpeg.Shar pen 1,130
''创建缩略图并将其保存到磁盘
FilePath =替换(FilePath," /"," \" ;)
FilePath =替换(FilePath," ImageUploads \","")
Jpeg.Save Server.MapPath(" ImageUploads\Thumbs" ;)& " \Thumb" &安培; FilePath
%>
Upload.Form("scale") is probably not a number and as such the implicit
coercion to a number is failing.
Try debugging and finding out what this value is returning.
Chris.
"Mark Sargent" <do*********@hotmail.com> wrote in message
news:OX**************@TK2MSFTNGP09.phx.gbl...
Hi All,
why am I getting this error..? Cheers.
Mark Sargent.
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: ''[string: ""]''
/Classifieds/ClassifiedImageResize.asp, line 27
<%
'' Create instance of AspJpeg
Set Jpeg = Server.CreateObject("Persits.Jpeg")
'' Compute path to source image
Path = Server.MapPath(FilePath)
'' Open source image
Jpeg.Open Path
'' Create an instance of AspUpload object
Set Upload = Server.CreateObject("Persits.Upload")
'' Decrease image size by %
((***Line 27***)) Jpeg.Width = Jpeg.OriginalWidth * Upload.Form("scale") /
100
Jpeg.Height = Jpeg.OriginalHeight * Upload.Form("scale") / 100
'' Apply sharpening if necessary
'' Jpeg.Sharpen 1, 130
'' create thumbnail and save it to disk
FilePath = Replace(FilePath, "/", "\")
FilePath = Replace(FilePath, "ImageUploads\", "")
Jpeg.Save Server.MapPath("ImageUploads\Thumbs") & "\Thumb" & FilePath
%>
" Mark Sargent"写道......
"Mark Sargent" wrote...
((*** Line 27 ***))Jpeg.Width = Jpeg.OriginalWidth * Upload.Form(" scale")/
100
Jpeg.Height = Jpeg.OriginalHeight * Upload.Form(" scale")/ 100
((***Line 27***)) Jpeg.Width = Jpeg.OriginalWidth * Upload.Form("scale") /
100
Jpeg.Height = Jpeg.OriginalHeight * Upload.Form("scale") / 100
尝试:
27:Jpeg.Width = Jpeg.OriginalWidth *(CInt(Upload.Form(" scale)))/ 100)
和
28:Jpeg.Height = Jpeg.OriginalHeight *(CInt(Upload.Form(scale))/ 100)
(我假设下一行是28等等。 。)
问候
Rob
Try :
27: Jpeg.Width = Jpeg.OriginalWidth * (CInt(Upload.Form("scale")) / 100)
and
28: Jpeg.Height = Jpeg.OriginalHeight * (CInt(Upload.Form("scale")) / 100)
(I assume the next line was 28 etc...)
Regards
Rob
这篇关于类型不匹配:'[string:""]'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!