note 74385 deleted from function.copy by colder

From: Date: Mon, 09 Apr 2007 00:16:35 +0000
Subject: note 74385 deleted from function.copy by colder
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-125234@lists.php.net to get a copy of this message
Note Submitter: Reason: bad code ---- If you want to copy directories, it was a problem, if the destinations directory is under the source directory. As a example, you want copy: dir1/dir2/ to dir1/dir2/ Use this to check, bevor you start to copie. <? function is_under($srcdir,$dstdir) { if($srcdir."/" == substr($dstdir,0,strlen($srcdir."/"))) return true; else return false; } ?> By "true" you can start...

« previous php.notes (#125234) next »