That was very similar to one I'd tried with no success - but I figured I'd made an error somewhere, so I took a fresh file_size.php and changed the line to your suggestion. I got the same result as illustrated above.
Here's what I have, after adding your suggestion:
Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// get special data templates from the datastore
$specialtemplates = array();
// pre-cache templates used by all actions
$globaltemplates = array();
require_once('./global.php');
$games = $DB_site->query("SELECT * FROM games");
while ($att = $DB_site->fetch_array($games))
{
$path = "./games/".$att['file'];
$filesize = filesize($path);
$filesize = intval($filesize/1024);
$DB_site->query("UPDATE vb3_games SET filesize='$filesize' WHERE gameid=$att[gameid]");
}
echo "DONE!";
?>
Is that correct? If it is, then I have some real problems. :nervous: