Aspnuke skriveadgang
Problemet i sin "enkelhed" :Jeg er den lykkelige ejer af et domain+webhotel, hvorpå jeg gerne vil køre aspnuke (egallery). Mit domain er opdelt i 2 afdelinger, en med læse/skrive adgang (scripts), og en uden (www). Aspnuke bruger database, så jeg har brug for at kunne ligge disse filer i min scripts og kunne køre resten fra www (tror jeg nok?). Problemet opstår når aspnuke skal have adgang til min scripts folder, for jeg ved ikke hvordan! Så vidt jeg kan forstå skal jeg ændre nogle ting (stier?) i en fil "database-inc.asp", men jeg ved ikke hvordan, eller rettere hvad jeg skal ændre dem til.
Dette er database-inc.asp filens indhold : håber det kan hjælpe.
tak :)
<%
' ************************************************************************
' * ASP-Nuke: Free web portal in ASP *
' ************************************************************************
' * Copyright (c) 2002-2003 by Gaetan Bouveret (webmaster@asp-nuke.com) *
' * http://www.asp-nuke.com *
' * *
' * This program is free software. You can redistribute it and/or modify *
' * it under the terms of the GNU General Public License as published by *
' * the Free Software Foundation; either version 2 of the License, or *
' * (at your option) any later version. *
' * *
' ************************************************************************
%>
<%
' Gives a database's connection
' IN : sDBName (string) : database's name
' OUT : (Object) : Connection
Function DBConnexion(sDBName)
Dim oCn, sConnString, oFs, sDBPath
sDBPath = Server.MapPath(GLOBAL_SITE_DATABASE_PATH)
Set oCn = Server.CreateObject("ADODB.Connection")
sConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; " & "DBQ=" & sDBPath & "\" & sDBName & ".mdb"
On Error Resume Next
oCn.Open sConnString
If Err.number <> 0 Then
Response.Write "<br>" & GetTranslation("LANG_SQL_ERROR")
If IsAuthorized(ROLE_ADMIN) Then
Response.Write " : " & Err.Description & "<br>"
Response.Write "Connexion String : " & sConnString & "<br>"
End If
Err.Clear
End If
On Error Goto 0
Set DBConnexion = oCn
End Function
' Gives a recordset from oCn, query rSQL
' IN : oCn (Object) : database's connection
' : rSQL (string) : query
' OUT : (Object) : recordset
Function DBRecordSet(oCn, rSQL)
On Error Resume Next
Set DBRecordSet = oCn.Execute(rSQL)
If Err.number <> 0 Then
Response.Write "<br>" & GetTranslation("LANG_SQL_ERROR")
If IsAuthorized(ROLE_ADMIN) Then
Response.Write " : " & Err.Description & "<br>"
Response.Write GetTranslation("LANG_QUERY") & " : " & rSQL & "<br>"
End If
Err.Clear
End If
On Error Goto 0
End Function
' Execute a query rSQL on oCn
' IN : oCn (Object) : database's connection
' : rSQL (string) : query
' OUT : -
Function DBExecute(oCn, rSQL)
On Error Resume Next
oCn.Execute rSQL
If Err.number <> 0 Then
Response.Write "<br>" & GetTranslation("LANG_SQL_ERROR")
If IsAuthorized(ROLE_ADMIN) Then
Response.Write " : " & Err.Description & "<br>"
Response.Write GetTranslation("LANG_QUERY") & " : " & rSQL & "<br>"
End If
Err.Clear
End If
On Error Goto 0
End Function
' Encrypt text to be SQL compliant
' IN : sText (string) : text to process
' OUT : (string) : text processed
Function SQLEncrypt(sText)
Dim sTemp
If Not IsNull(sText) Then sTemp = Replace(sText, "'", "''")
SQLEncrypt = sTemp
End Function
%>
