PHP 4.0 Bug #4666: rename or copy files, fails
| From: | cox at idecnet dot com | Date: | Mon, 29 May 2000 12:43:09 +0000 |
| Subject: | PHP 4.0 Bug #4666: rename or copy files, fails | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-19673@lists.php.net to get a copy of this message | ||
From: cox@idecnet.com
Operating system: Linux
PHP version: 4.0.0 Release
PHP Bug Type: Scripting Engine problem
Bug description: rename or copy files, fails
I can not copy or rename a file to a non absolut PATH. Ex:
include "files.inc";
$dir = "../images";
mycopy($file,$dir);
<--files.inc--->
function mycopy($foo,$dir){
copy($foo,$dir);
}
Now I need to do something ugly like:
<--files.inc--->
function mycopy($foo,$dir){
global $PATH_TRANSLATED;
$path = dirname($PATH_TRANSLATED);
$foo = $path . "/" . $foo;
copy($foo,$dir);
}
With PHP < 4.0RC2 all was good. Unlink works good also.
My PHP4 version is CVS 26-05-00