<?php
// setup.php — একবার run করুন তারপর delete করুন
$dirs = [
    __DIR__ . '/uploads',
    __DIR__ . '/uploads/videos',
    __DIR__ . '/uploads/apks',
    __DIR__ . '/uploads/files',
];

echo "<pre style='font-family:monospace;font-size:14px;background:#111;color:#0f0;padding:20px'>";
echo "=== SETUP ===\n\n";

foreach ($dirs as $d) {
    if (!file_exists($d)) {
        $r = @mkdir($d, 0755, true);
        echo ($r ? "✅ Created" : "❌ Failed ") . ": $d\n";
    } else {
        chmod($d, 0755);
        echo "✅ Exists : $d\n";
    }
    echo "   Writable: " . (is_writable($d) ? "YES ✅" : "NO ❌") . "\n";
}

echo "\n--- PHP Info ---\n";
echo "upload_max_filesize : " . ini_get('upload_max_filesize') . "\n";
echo "post_max_size       : " . ini_get('post_max_size') . "\n";
echo "max_execution_time  : " . ini_get('max_execution_time') . "\n";
echo "PHP version         : " . PHP_VERSION . "\n";
echo "\n✅ Setup complete! এই ফাইলটি delete করুন।\n";
echo "</pre>";
