note 87315 added to function.touch

From: Date: Sat, 29 Nov 2008 18:29:55 +0000
Subject: note 87315 added to function.touch
Groups: php.notes 
Request: Send a blank email to php-notes+get-147426@lists.php.net to get a copy of this message
At least on Linux, touch will not change the time on a symlink itself, but on the file/directory it points to. The only way to work around this is to unlink the symlink, then recreate it. It took a bit of searching to discover this. The OS itself provides no way to do it. Many people wondered why anyone would want to do this. I use symlinks inside a web tree to point to files outside the web tree. After a certain length of time has passed, I want the symlinks to die, so the files cannot be successfully hotlinked. ---- Server IP: 208.69.120.35 Probable Submitter: 68.188.227.182 ---- Manual Page -- http://www.php.net/manual/en/function.touch.php Edit -- https://master.php.net/note/edit/87315 Del: integrated -- https://master.php.net/note/delete/87315/integrated Del: useless -- https://master.php.net/note/delete/87315/useless Del: bad code -- https://master.php.net/note/delete/87315/bad+code Del: spam -- https://master.php.net/note/delete/87315/spam Del: non-english -- https://master.php.net/note/delete/87315/non-english Del: in docs -- https://master.php.net/note/delete/87315/in+docs Del: other reasons-- https://master.php.net/note/delete/87315 Reject -- https://master.php.net/note/reject/87315 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#147426) next »