note 74385 added to function.copy

From: Date: Sun, 08 Apr 2007 23:44:16 +0000
Subject: note 74385 added to function.copy
Groups: php.notes 
Request: Send a blank email to php-notes+get-125232@lists.php.net to get a copy of this message
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... ---- Server IP: 194.153.94.10 Probable Submitter: 212.60.36.227 ---- Manual Page -- http://www.php.net/manual/en/function.copy.php Edit -- https://master.php.net/note/edit/74385 Del: integrated -- https://master.php.net/note/delete/74385/integrated Del: useless -- https://master.php.net/note/delete/74385/useless Del: bad code -- https://master.php.net/note/delete/74385/bad+code Del: spam -- https://master.php.net/note/delete/74385/spam Del: non-english -- https://master.php.net/note/delete/74385/non-english Del: in docs -- https://master.php.net/note/delete/74385/in+docs Del: other reasons-- https://master.php.net/note/delete/74385 Reject -- https://master.php.net/note/reject/74385 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#125232) next »