php通过mysql字段里的文件路径获取文件大小
发布网友
发布时间:2023-01-15 01:15
我来回答
共1个回答
热心网友
时间:2023-11-10 14:01
<?
$sql = "select * from `down`";
$rs = mysql_query($sql);
while($ary = mysql_fetch_array($rs)){
$sql1 = "update `down` set down_size='".abs(filesize($ary["down_file"]));."' where id=".$ary["id"];
$rs1 = mysql_query($sql1) or die(mysql_error());
}
@mysql_free_result($rs);
?>
热心网友
时间:2023-11-10 14:01
<?
$sql = "select * from `down`";
$rs = mysql_query($sql);
while($ary = mysql_fetch_array($rs)){
$sql1 = "update `down` set down_size='".abs(filesize($ary["down_file"]));."' where id=".$ary["id"];
$rs1 = mysql_query($sql1) or die(mysql_error());
}
@mysql_free_result($rs);
?>