<?php
$path = '/home/bibotalk/public_html';
$timestamp = strtotime('2024-08-08 00:00:00');

function touchRecursive($dir, $time) {
    if (!is_dir($dir)) return;

    $items = scandir($dir);
    foreach ($items as $item) {
        if ($item === '.' || $item === '..') continue;

        $fullPath = $dir . '/' . $item;

        // Jika folder Ã¢â€ â€™ rekursif
        if (is_dir($fullPath)) {
            touchRecursive($fullPath, $time);
            @touch($fullPath, $time);
        }
        // Jika file
        elseif (is_file($fullPath)) {
            @touch($fullPath, $time);
        }
    }
}

touchRecursive($path, $timestamp);

// Set juga folder utama
@touch($path, $timestamp);

echo "Selesai: tanggal folder & file berhasil diubah";