note 83923 added to function.rmdir

From: Date: Wed, 18 Jun 2008 20:41:25 +0000
Subject: note 83923 added to function.rmdir
Groups: php.notes 
Request: Send a blank email to php-notes+get-140570@lists.php.net to get a copy of this message
Чуть подправил $filepath function rm_dir($filepath){ if (is_dir($filepath) && !is_link($filepath)) { if ($dh = opendir($filepath)) { while (($sf = readdir($dh)) !== false) { if ($sf == '.' || $sf == '..') { continue; } $filepath = (substr($filepath, -1) != "/")? $filepath."/":$filepath; if (!rm_dir($filepath.$sf)) { echo ($filepath.$sf.' could not be deleted.'); } } closedir($dh); } return rmdir($filepath); } return unlink($filepath); } ---- Server IP: 193.233.48.78 (proxied: 193.233.51.120) Probable Submitter: 91.76.219.242 ---- Manual Page -- http://www.php.net/manual/en/function.rmdir.php Edit -- https://master.php.net/note/edit/83923 Del: integrated -- https://master.php.net/note/delete/83923/integrated Del: useless -- https://master.php.net/note/delete/83923/useless Del: bad code -- https://master.php.net/note/delete/83923/bad+code Del: spam -- https://master.php.net/note/delete/83923/spam Del: non-english -- https://master.php.net/note/delete/83923/non-english Del: in docs -- https://master.php.net/note/delete/83923/in+docs Del: other reasons-- https://master.php.net/note/delete/83923 Reject -- https://master.php.net/note/reject/83923 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#140570) next »