I was just experimenting with PHP trying to get it to find how many bytes are being used in a directory, and convert it to Megabytes. The "totalSpace variable will echo the ammount of bytes, but When I try to echo "newValue" after having it do an equation it just gives the or die message. It is probably something simple, but I am very inexperienced with PHP or any other server-sided or programing languages.
<?php
$totalSpace = disk_total_space("./") or die("Error DFS");
echo $totalSpace;
if ($totalSpace > 1048576) {
$totalSpace / 1048576 == $newValue;
}
echo $newValue or die("Error");
?>
I tried looking on Stack Overflow and other sources for answers to this question, but couldn't really find anything. What am I doing wrong here?