在线ASP转PHP
示例
ASP源码
<% set rs=server.CreateObject("adodb.recordset") sqlstr="select * from message" rs.open sqlstr,conn,1,3 rs.movefirst while not rs.eof response.write(rs("name")&"") response.write(rs("depr")&"") response.write(rs("tel")&"") response.write(rs("add")&"") rs.movenext wend rs.close conn.close set rs=nothing set conn=nothing %>
转换 的 PHP 代码
query( $sqlstr);$rs=mysql_fetch_array($rsObj);$rs$movefirst;while( $rs= $GLOBALS['conn']->fetch_array($rsObj) ){ echo($rs['name'].''); echo($rs['depr'].''); echo($rs['tel'].''); echo($rs['add'].'');}$rs=$nothing;$conn=$nothing;?>