tiperrot
Messages postés2Date d'inscriptionjeudi 21 août 2008StatutMembreDernière intervention 9 janvier 2009
-
21 août 2008 à 17:05
cs_ghuysmans99
Messages postés3982Date d'inscriptionjeudi 14 juillet 2005StatutMembreDernière intervention30 juin 2013
-
22 août 2008 à 10:33
Bonjour j'ai un problème avec mon code il me donne toujour une erreur 500 j'ai déjà vérifié la sécurité sur mon serveur et toute est corrècte. Je crois que l'erreur vient de ma page de code si quelqu'un peut m'aide ce serais très très apprécier car je cherche depuis deux semaine à faire différent essais et toujour le même problème voici mon code de cette page
<%
'on error resume next
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
'CREATE THE FILE
Set objFile = objFSO.CreateTextFile(vFileName)
'BUILD A STRING FOR EACH OF THE NAME/VALUE PAIRS SUBMITED ABOVE
'THIS IS THE FIRST LINE OF OUR FSO FILE. IT MARKS THE FILE AS ASP
'objFile.Writeline "<!--#INCLUDE FILE='DIM_CONST.ASP'-->"
objFile.Writeline vbCRLF&Chr(60)&Chr(37)&vbCRLF
'BODY
FOR EACH itm IN Request.Form
isInt =false
IF CInt(INSTR(itm, "DoNotSubmitMe")) < CInt(1) THEN
vString = itm vString vString & " "
'check so no " " for integer
for a=0 to 10
if instr(Request.Form(itm), a) then
isInt = true
end if
next
if isnumeric(Request.Form(itm)) then
vString = vString & Request.Form(itm) & vbCRLF
else
vString = vString & """" & Request.Form(itm) & """" & vbCRLF
end if
'WRITE IT TO THE FILE
objFile.Writeline vString
END IF
NEXT
'THIS IS THE LAST LINE OF OUR FILE AND IT CLOSES OUR SCRIPT BLOCK
objFile.Writeline Chr(37)&Chr(62)&vbCRLF
'CLOSE THE FILE
objFile.Close
IF Err.number <> 0 THEN
msg = "There was an error: "&Err.Description&""
response.redirect("/error.asp?msg=" & msg)
END IF
cs_ghuysmans99
Messages postés3982Date d'inscriptionjeudi 14 juillet 2005StatutMembreDernière intervention30 juin 201316 22 août 2008 à 10:33
Le fichier existe déjà !
Pense à le supprimer avant d'écrire dedans ...
_________________________________________________________________________
VB.NETis good ...VB6is better<