note 101980 added to function.copy
| From: | tomas at slax dot org | Date: | Fri, 21 Jan 2011 12:09:06 +0000 |
| Subject: | note 101980 added to function.copy | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-175961@lists.php.net to get a copy of this message | ||
Very important to note is that copy() handles url wrappers, but sometimes incorrectly. For example,
you can copy a file like
<?php
copy("http://example.net/file.dat","./local_file.dat");
?>
However, it doesn't work with spaces in filename (as of PHP 5.2.13, please test in newer
versions).
<?php
copy("http://example.net/file with
space.dat","./local_file.dat");
?>
To fix this, you need to replace spaces with %20.
----
Server IP: 147.32.160.17
Probable Submitter: 90.176.245.137
----
Manual Page -- http://www.php.net/manual/en/function.copy.php
Edit -- https://master.php.net/note/edit/101980
Del: integrated -- https://master.php.net/note/delete/101980/integrated
Del: useless -- https://master.php.net/note/delete/101980/useless
Del: bad code -- https://master.php.net/note/delete/101980/bad+code
Del: spam -- https://master.php.net/note/delete/101980/spam
Del: non-english -- https://master.php.net/note/delete/101980/non-english
Del: in docs -- https://master.php.net/note/delete/101980/in+docs
Del: other reasons-- https://master.php.net/note/delete/101980
Reject -- https://master.php.net/note/reject/101980
Search -- https://master.php.net/manage/user-notes.php