עבור לתוכן

הורדתי קוד של Chat ולא עובד , עזרה בבקשה

Featured Replies

פורסם

צירפתי את הקובץ שהורדתי , אני מריץ את הchat.asp

והתקלה:

Error Type:

Active Server Pages, ASP 0234 (0x80004005)

Server side include directives may not be present in script blocks. Please use the SRC= attribute of the <SCRIPT> tag.

/chat/global.asa, line 3

איך מתקנים?

תודה

[attachment deleted by admin]

פורסם

רשום לך שלא ניתן לעשות INCLUDE בצורה הזו.

עריכה: אם אתה רוצה למחוק את כל הרשומות יש דרך פשוטה יותר.

פורסם
  • מחבר

אשמח אם תוכל לעלות את הקוד מתוקן :smile1:

פורסם

בקשר למחיקה - פשוט תשתמש בשאילתת DELETE במקום הלולאה הזו.


<script language="vbscript" runat="server" src="include/yourfile.asp"></script>

פורסם
  • מחבר

מה אני אמור לרשום בsrc ?

כדי להיות בטוח , אתה אומר להחליף את השורה הראשונה בglobal.asa לשורה זו שרשמת?

פורסם

אתה אמור לשים שם את הכתובת של הדף שלך.

ולא את השורה הראשונה. אתה אמור לשים את זה לפני השורה הראשונה, ולמחוק את הINCLUDE הקודם שלך.

פורסם
  • מחבר

כתובת של איזה דף?

יש מצב שאתה משנה את הקוד בצורה שיעבוד?

תודה לך

פורסם

לדף הזה: config.in

פורסם
  • מחבר

עדיין השגיאה:

Error Type:

Active Server Pages, ASP 0234 (0x80004005)

Server side include directives may not be present in script blocks. Please use the SRC= attribute of the <SCRIPT> tag.

/chat/config.inc, line 2

הינה הקוד של global.asa :

<script language="vbscript" runat="server" src="config.inc">

Sub Session_OnStart

Session.Timeout =1

End Sub

Sub Session_OnEnd

'**Put your code here **

response.redirect ("logout.asp")

End Sub

Sub Application_OnEnd

dim DB, rst

set DB= Connect (ChatMDB)

Set rst = Server.CreateObject ("ADODB.Recordset")

rst.Open "Select * FROM USERS", DB, adOpenStatic, adLockPessimistic

rst.movefirst

do until rst.EOF

rst.Delete

rst.Update

rst.MoveNext

loop

end if

rst.close

db.close

set db=nothing

set rst=nothing

End Sub

'EventName Description

'Session_OnStart Runs the first time a user runs any page in your application

'Session_OnEnd Runs when a user's session times out or quits your application

'Application_OnStart Runs once when the first page of your application is run for the first time by any user

'Application_OnEnd Runs once when the web server shuts down

</SCRIPT>

פורסם

זה בגלל שבתוך הCONFIG אתה עושה INCLUDE למשהו אחר.

בדרך כלל לא צריך לעשות INCLUDE בGLOBAL ASA.

פורסם
  • מחבר

אז איך פותרים את הבעיה?

מישהו יוכל לתקן לי את הקוד כך שיעבוד?!

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים