程序高手请进,答完之后立即加分

来源:百度知道 编辑:UC知道 时间:2024/09/24 04:07:37
这是ASP编程(输入两列,四行),我想改成PHP,,,怎么改??

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<%
i=1
set rs=server.CreateObject("adodb.recordset")
sql="----------------查询未写"
rs.open sql,conn,1,1
do while not rs.eof
%>
<td height="20" ><span>·</span> <a href="<%= (rs.Fields.Item("type001").Value) %>/<%= (rs.Fields.Item("type002").Value) %>/<%= (rs.Fields.Item("file_name").Value) %>" target="_blank">
<%if len(trim(rs("productname")))>13 then
response.write left(trim(rs("productname")),8)&".."
else
response.write trim(rs("productname"))

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<?php
$i=1;
$SQL = mysql_query("----------------查询未写");

while ($rs = mysql_fetch_array($SQL)) {
?>
<td height="20" ><span>·</span> <a href="<?= $rs['type001']?>/<?= $rs['type002']?>/<?= $rs['file_name']?>" target="_blank">
<?php
if ( strlen(trim(rs['productname'])) > 13 ) {
echo substr(trim(rs['productname']),0,8)."..";
} else {
echo trim(rs['productname']);
}
?></font>
</a> <font color=#FF6600>¥<?=trim(rs['huiyuanjia'])?> 元</font> <?
if ( ! i % 2 ) {
?> </td>
</tr>
<?php
}
?>
<?
$i++;
}