The code is as follows | Copy the code |
/** $from = rtrim(str_replace(' //','/',$from), '/');//In order to be compatible on Linux, we convert all / symbols into / because both symbols under windows are acceptable. /* $files: Array ( [0] => . [1] => .. [2] => a [3] => b [4] => ; c [5] => dir [6] => dir.php [7] => dir2 [8] => dir2.php [9] => function_file.php [10] => homework .php ) if(is_dir($subFrom)){ |
The code is as follows | Copy the code |
|
if(rename ($file,$rename)==TRUE){ | echo "Rename file successfully!";}else{ | echo "Rename file failed!";
rename("html/renameCache.txt","html/a/2.txt"); //Use the rename() function to rename the directory
Previous article:Basic operations of directories and files 1 (44)
Next article:PHP utility function: stream_context_create simulates POST/GET
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Latest Issues
Now only one piece of data is returned. How to return all data that meets the conditions?
From 1970-01-01 08:00:00
0
0
0
Does a member function without a self parameter mean it has become private?
From 1970-01-01 08:00:00
0
0
0
PHP constants and variables external variables code problems in the textbook
From 1970-01-01 08:00:00
0
0
0
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
|