note 69001 added to function.copy
| From: | fred dot haab at gmail dot com | Date: | Sat, 19 Aug 2006 00:49:08 +0000 |
| Subject: | note 69001 added to function.copy | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-116040@lists.php.net to get a copy of this message | ||
Just some caveats for people to consider when working with this copy function. Like everyone else,
I needed a recursive copy function, so I wrote one.
It worked great until I hit a file greater than 2GB, at which point I got a File Size Exceeded
error. I've read that you can recompile PHP with larger file support, but I'm not able to
do this on my system.
So I used exec to copy one file at a time (I need to do other things to the file, so can't just
do an exec with "cp -r"). Then I ran into problems with spaces in the names. The
escapeshellcmd and escapeshellargs functions don't seem to cleanup spaces, so I wrote my own
function to do that.
----
Server IP: 64.71.164.2
Probable Submitter: 64.236.240.190
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.copy.php
Edit -- https://master.php.net/note/edit/69001
Del: integrated -- https://master.php.net/note/delete/69001/integrated
Del: useless -- https://master.php.net/note/delete/69001/useless
Del: bad code -- https://master.php.net/note/delete/69001/bad+code
Del: spam -- https://master.php.net/note/delete/69001/spam
Del: non-english -- https://master.php.net/note/delete/69001/non-english
Del: in docs -- https://master.php.net/note/delete/69001/in+docs
Del: other reasons-- https://master.php.net/note/delete/69001
Reject -- https://master.php.net/note/reject/69001
Search -- https://master.php.net/manage/user-notes.php