note 73067 added to function.rmdir

From: Date: Wed, 07 Feb 2007 21:42:06 +0000
Subject: note 73067 added to function.rmdir
Groups: php.notes 
Request: Send a blank email to php-notes+get-123096@lists.php.net to get a copy of this message
Regarding the shell method by noel: Remeber that many of php's functions involving file and directory permissions / existance / etc use cached results (stat() family functions). By calling out to a separate process with the exec family of functions you will need to call clearstatcache(); afterwards or else is_dir() will report erroneous results. Found that out the hard way. Also make sure $tmp isn't '/' or else you will end up running a rm -rf / which might not be good for you. Found that out the hard way too . . . ---- Server IP: 64.71.164.2 Probable Submitter: 66.251.95.151 ---- Manual Page -- http://www.php.net/manual/en/function.rmdir.php Edit -- https://master.php.net/note/edit/73067 Del: integrated -- https://master.php.net/note/delete/73067/integrated Del: useless -- https://master.php.net/note/delete/73067/useless Del: bad code -- https://master.php.net/note/delete/73067/bad+code Del: spam -- https://master.php.net/note/delete/73067/spam Del: non-english -- https://master.php.net/note/delete/73067/non-english Del: in docs -- https://master.php.net/note/delete/73067/in+docs Del: other reasons-- https://master.php.net/note/delete/73067 Reject -- https://master.php.net/note/reject/73067 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#123096) next »