[asp]expected end of statement op Option Explicit?

Pagina: 1
Acties:

  • TeeDee
  • Registratie: Februari 2001
  • Laatst online: 21:44
Hoi,

heb eindelijk besloten om met Option Explicit te werken. (jajajaja :))

Nu iets heel raars:

ASP:
1
2
3
4
5
6
7
8
9
10
11
12
<%@ LANGUAGE="VBSCRIPT" %>
<% Option Explicit %>
<!--#include file="md5.asp"-->
<%
' Global Settings file versie 1
Dim ImgDirHr, ImgDirLr, xlsDir, tmpDir
' dit zijn de globale paden van de verschillende directory's!
ImgDirHr = (server.mappath("/uploads/hr/"))
ImgDirLr = (server.mappath("/uploads/lr/"))
xlsDir = (server.mappath("/uploads/xls/"))
tmpDir = (server.mappath("/uploads/tmpupl/"))
%>

Ik krijg hierbij heel netjes (maar wel vreemd) de volgende foutmelding:
code:
1
2
3
4
5
6
7
8
Microsoft VBScript compilation error '800a0400' 

Expected statement 

/includes/globals.asp, line 2 

Option Explicit
^

Mijn klomp breekt echt nu. Die eerste 2 regels, wat kan daar nu fout in gaan? Ik heb deze volgorde op alle tutorials, scripts etc. etc. gezien.

Hoe kan dit nou?

Heart..pumps blood.Has nothing to do with emotion! Bored


  • Kermit.de.Kikker
  • Registratie: Februari 2002
  • Laatst online: 30-08 13:57
Je moet Option Explicit natuurlijk niet in je include files zetten, mag maar 1 keer.

  • TeeDee
  • Registratie: Februari 2001
  • Laatst online: 21:44
ik roep dit include file ineens aan:

dus:
http://url/includes/globals.asp

Dus dan zou hij het zowiezo moeten doen. Dit is alleen om te testen.

Edit:
crap, ik riep een ander file aan. Dacht dat ik nog steeds die globals.asp aanriep.
Solly |:( 8)7

Heart..pumps blood.Has nothing to do with emotion! Bored


  • TeeDee
  • Registratie: Februari 2001
  • Laatst online: 21:44
Hmm.. dus niet :(

ASP:
1
2
3
4
5
6
7
8
9
10
11
12
<title>MD 5 Hasher</title>
<% Option Explicit %>
<!--#include file="globals.asp" -->
<%
Dim PassWordString,MD, HASH, HASH2, MD2
PassWordString = "password test stringetje"
Response.write PassWordString&"<br>"
Set MD = New MD5
HASH = MD.DigestStrToHexStr(PassWordString)
Set MD = Nothing
Response.Write HASH&"<br>"
%>


Ik roep nu dit file aan. Deze roept weer globals.asp aan.
inhoud van globals.asp nu
ASP:
1
2
3
4
5
6
7
8
9
10
<!--#include file="md5.asp"-->
<%
' Global Settings file versie 1
Dim ImgDirHr, ImgDirLr, xlsDir, tmpDir
' dit zijn de globale paden van de verschillende directory's!
ImgDirHr = (server.mappath("/uploads/hr/"))
ImgDirLr = (server.mappath("/uploads/lr/"))
xlsDir = (server.mappath("/uploads/xls/"))
tmpDir = (server.mappath("/uploads/tmpupl/"))
%>

Arrrrgh... hij blijft een error geven op die option.explicit

Klote

/edit:
en nu doet ie het wel:
<title>MD 5 Hasher</title> onder de option explicit gezet. Vreemdsels!

Heart..pumps blood.Has nothing to do with emotion! Bored


  • gorgi_19
  • Registratie: Mei 2002
  • Laatst online: 30-08 15:34

gorgi_19

Kruimeltjes zijn weer op :9

Note that the Option Explicit statement must be placed at the top of the code before any other VBScript commands or any HTML code.
http://www.devguru.com/Te...ckref/optionexplicit.html

Digitaal onderwijsmateriaal, leermateriaal voor hbo


  • TeeDee
  • Registratie: Februari 2001
  • Laatst online: 21:44
thanks...

Heart..pumps blood.Has nothing to do with emotion! Bored

Pagina: 1