As we all know, the rename () function can rename files or directories. It can also do many things. Friends familiar with unix should know the shell command mv, which is equivalent to win32 movement, and can be renamed at the same time. everyone knows that rename () the function can rename a file or directory. It can also do many things.
Friends familiar with unix should know the shell command mv, which is equivalent to win32 movement and can be renamed while moving. I found that php's rename () function is equivalent to mv. it not only has the simple rename function, but also can change the path of files or even all directories.
For example:
$ Oldpath ---- original path of the file or directory
$ Newpath ---- new definition path
Then rename ($ oldpath, $ newpath) can complete the control of file/directory movement
The php4 versions of win32 and unix support this function.
In addition, it seems that the win32 version of php4 has canceled the unlink () function. You can also use the rename () function to complete the deletion control. for example:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.