so i have a bunch of files, some can be up to 30-40mb and i want to use php to handle security of the files, so i can control who has access to them
i çeşit bu kaba örnekteki gibi bir komut dosyası var demektir
$has_permission = check_database_for_permission($user, filename);
if ($has_permission) {
header('Content-Type: image/jpeg');
readfile ($filename);
exit;
} else {
// return 401 error
}
yakında birkaç eşzamanlı istekleri ile benim sunucuda tüm bellek çiğnemek gibi i, belleğe tam dosyayı yüklemek için her istek için nefret ediyorum
sorular öylesine bir çift
- Bunu yapmanın en etkili yolu bellek readfile nedir?
- ben bakan olduğumu, aynı sonucu elde biraz daha iyi bir yöntem var mı?
Sunucu: apache/php5
teşekkürler