1. 首页
  2. 电脑知识

php5.3和php5.6的区别写法

php5.3的写法
<?php
$result = mysql_query(“SELECT * FROM Browser ORDER BY aid DESC limit 0,10”);
while($row = mysql_fetch_array($result))
{
$tm = mysubstr($row[‘tm’],0,33);
echo “<li><a href=/view.php?aid=”.$row[‘aid’].”>”;
echo $tm;
echo “</a></li>”;
}

?>
php5.6的写法
<?php
$result = mysqli_query($conn,”SELECT * FROM Browser ORDER BY aid DESC limit 0,10″);
while($row = mysqli_fetch_array($result))
{
$tm = cutstr($row[‘tm’],33);
echo “<li><a href=/view.php?aid=”.$row[‘aid’].”>”;
echo $tm;
echo “</a></li>”;
}

?>

本文来自投稿,不代表丁香知识网立场,当前页地址:https://www.dxju.cn/archives/3953

联系我们

18056540210

在线咨询:点击这里给我发消息

邮件:ziylh00@163.com

工作时间:周一至周五,9:30-18:30,节假日休息