파일 연결을 포함하는 경우 :ASP 클래식 - 오류가 내가 좋아하는 같은 폴더에 두 개의 파일이
<%
'declare the variables
Dim Connection
Dim ConnString
'define the connection string, specify database driver
ConnString="DRIVER={SQL Server};SERVER=myServername;UID=myUsername;" & _
"PWD=myPassword;DATABASE=myDatabasename"
'create an instance of the ADO connection and recordset objects
Set Connection = Server.CreateObject("ADODB.Connection")
'Open the connection to the database
Connection.Open ConnString
%>
및 default.asp와 다음이 포함됩니다 :
Example
|-connect.asp
|-default.asp
대로 Connect.asp을 포함
<!-- #include virtual="connect.asp" -->
<%
Dim Recordset
Set Recordset = Server.CreateObject("ADODB.Recordset")
%>
하지만 localhost/example을 실행하면 오류가 발생합니다.
An error occurred on the server when processing the URL. Please contact the system administrator. If you are the system administrator please click here to find out more about this error.
include 파일을 사용하지 않고 하나의 파일에 모두 쓰면 작동합니다.
어떻게이 오류를 해결할 수 있습니까?
서버에 액세스 할 수 있으면이 페이지에서 유용한 오류 메시지를 얻을 수 있습니다. http://www.chestysoft.com/asp-error-messages.asp – John
IE에서 친숙한 오류 메시지를 해제하고 서버가 자세한 오류 메시지를 보내 더 의미있는 오류 메시지를 얻을 수 있습니다. 또는 오류를 코드에 기록하고 세부 오류 메시지를 어딘가에 기록하십시오. 특정 오류를 알면 더 의미있는 대답을 얻을 수 있습니다. – AnonJr