Voting

: seven minus two?
(Example: nine)

The Note You're Voting On

Lingasamy Sakthivel
7 years ago
Using fseek is really slow. This one really better and faster.

if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
$size = trim(exec("for %F in (\"" . $file . "\") do @echo %~zF"));
}
elseif ((PHP_OS == 'Linux') || (PHP_OS == 'FreeBSD') || (PHP_OS == 'Unix') || (PHP_OS == 'SunOS')) {
$size = trim(shell_exec("stat -c%s " . escapeshellarg($file)));
} else {
$size = filesize($file);
}

<< Back to user notes page

To Top