As you all know, the rename () function can rename a file or directory. In fact, it can do a lot of things.
A friend familiar with Unix should know the shell command MV, which is quite moving with Win32, and can be renamed while moving. I found that PHP's rename () function is the equivalent of MV, which is not just a simple renaming function, it can also change the path of the file or even the entire directory.
For example:
OldPath----file or directory original path
NewPath----a new defined path
Then rename (Oldpath,newpath) can complete the file/directory move operation
This feature is supported in the PHP4 versions of Win32 and UNIX.
Also, as if PhP4 's Win32 version cancels the unlink () function. You can also use the rename () function to complete the removal operation, for example:
Path----file or directory paths
TMP----TMP directory (/tmp)
Use rename (path,tmp) to move the files to the TMP directory.