나는 .asp 파일에서 이러한 기능을 .php 함수로 변환하거나 변환하려고 시도하고 있습니다. 아직 익숙하지 않기 때문에 .asp. 그들 중 일부는 SQL 명령과 원격 테이블의 데이터가있는 자리 표시 자 등을 인식하고 이해할 수 있으며 나머지는 혼란 스럽습니다. 나는 PHP의 include와 동등하다고 생각하는 include 같은 것을 이미 변환했다. 함수 및 여러 다른. 두 언어에 대한 실무 지식을 가진 사람이 어떤 기능이 어떤 위치에 있는지 알 수 있습니까?asp 함수를 통해 PHP로 변환
<!--#include virtual="/includes/functions.asp" -->
<%
intBusiness_Catagory = Request("select_catagory")
Set thisConn = Server.CreateObject("ADODB.Connection")
thisConn.Open CreateAfccDSN()
SelectSQL = "SELECT * FROM BusinessInfo WHERE ((CatID = " & intBusiness_Catagory & ") or (CatID2 = " & intBusiness_Catagory & ") or (CatID3 = " & intBusiness_Catagory & ")) and (intStatusCodeID = 1) and (intOnWeb = 1) Order By vcBusinessName"
Set SelectRs = thisConn.Execute(SelectSQL)
If SelectRs.EOF Then
Response.Write("No members found for selected category.<br> Please search <a href='javascript:history.back()'>again</a>.")
Else
%>
<b>Member Search Results:</b>
<p>
<%
End If
If Not SelectRs.BOF AND Not SelectRs.EOF then
SelectRs.MoveFirst
Do Until SelectRs.EOF
%>
<b><%=SelectRs("vcBusinessName") %></b><br>
<%=SelectRs("vcPhone") %><br>
<%=SelectRs("vcPAddress") %><br>
<%=SelectRs("vcPCity") %>, <%=SelectRs("vcPState") %> <%=SelectRs("vcPZipCode") %><br>
<%
If isNull(SelectRs("vcURL")) then
Else
%>
<b>Website: </b><a href="http://<%=SelectRs("vcURL") %>" target="_blank"><%=SelectRs("vcURL") %></a>
<%
End If
%>
<p>
<hr>
<%
SelectRs.MoveNext
Loop
%>
<%
End If
SelectRs.Close
Set SelectRs = Nothing
%>
에 할당합니다. ASP 코드의 어느 부분을 이해하지 못합니까? –
if 문, Rewrite 문, Set thisConn = Server.CreateObject, thisConn.Open CreateAfccDSN() 및 intBusiness_Catagory가 주로 사용됩니다. – Tower