note 87356 modified in function.touch by thiago

From: Date: Mon, 01 Dec 2008 22:04:40 +0000
Subject: note 87356 modified in function.touch by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147498@lists.php.net to get a copy of this message
Only way to change modification date in catalogue is to create file in via touch() and dalete it with unlink(): <?php $dir = 'temp'; $files1 = scandir($dir); $files1 = array_slice($files1, 2); foreach ($files1 as $key => $val) { if (!is_dir($val)) continue; if (!touch($val)) { touch($val . "/plik.txt"); unlink($val . "/plik.txt"); } } ?> --was-- Only way to change modification date in catalogue is to create file in via touch() and dalete it with unlink(): $dir = 'temp'; $files1 = scandir($dir); $files1 = array_slice($files1, 2); foreach ($files1 as $key => $val) { if (!is_dir($val)) continue; if (!touch($val)) { touch($val . "/plik.txt"); unlink($val . "/plik.txt"); } } http://php.net/manual/en/function.touch.php

« previous php.notes (#147498) next »