I wanted to convert this coldfusion code to php code how would I do that. The code is below.
<cffile action="read" file="c:/Inetpub/wwwroot/r
svp/admin/
NetIDDump.
csv" variable="netID"/>
<cfset CR = "#Chr(13)##Chr(10)#">
<cfset netID = Replace("#netID#", "#CR#", ",", "ALL")>
<cfset rowNum = 1>
<cfset navNum = 1>
<cfset output = "<html>
<head>
<title>NetID IPs</title>
<meta http-equiv=""Content-Type"
" content=""text/html; charset=iso-8859-1"">
</head>
<body>
<div align=""center""><h1>IP Page</h1></div>
<h2>This file was last updated #DateFormat(now(),"mm/dd/y
yyy")#</h2
><br>
<table align=""center"" width=""650"">
<tr>
<td colspan=""2"" align=""center"">
<cfinclude template=""../admin/A_Z_Lo
cal_Target
_Nav.cfm""
>
</td>
</tr>
<tr>
<th align=""left"">Full Domain Name</th>
<th align=""left"">IP</th>
</tr>">
<cfset lastChar = "">
<cfset IP = "">
<cfloop index="item" list="#netID#" delimiters=",">
<cfif rowNum MOD 2 IS NOT 0>
<cfif navNum MOD 25 IS 0>
<cfset output = "#output#
<tr>
<td colspan=""2"" align=""center"">
<cfinclude template=""../admin/A_Z_Lo
cal_Target
_Nav.cfm""
>
</td>
</tr>">
</cfif>
<cfset IP = #item#>
<cfset navNum = #navNum# + 1>
<!--- <cfoutput>Nav = #navNum# </cfoutput>
<cfoutput>IP = #item# </cfoutput> --->
<cfelse>
<cfset full_domain_name = #item#>
<!--- <cfoutput>name = #item# </cfoutput> --->
<cfoutput>
<cfset firstChar = Left("#item#",1)>
<cfset output = "#output#<tr>">
<cfif firstChar IS NOT lastChar>
<cfset output = "#output#
<td><a id=""#firstChar#"">#full_d
omain_name
#</a></td>
">
<cfelse>
<cfset output = "#output#
<td>#full_domain_name#</td
>">
</cfif>
<cfset output = "#output#
<td>#IP#</td></tr>">
</cfoutput>
<cfset lastChar = #firstChar#>
</cfif>
<!--- <cfoutput>rowNum = #rowNum#<br></cfoutput> --->
<cfset rowNum = #rowNum# + 1>
</cfloop>
<cfset output = "#output#
</table>
</body>
</html>">
<cffile action="write" file="c:/Inetpub/wwwroot/r
svp/etc/La
bIPs.cfm" output="#output#">
<cflocation url="LabIPs.cfm">
Start Free Trial