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
There is no output in the parent window
document.onclick = function(){ window.opener.document.write('I am the output of the child ...
From 2024-04-18 23:52:34
0
1
1284
PX automatic conversion to REM error
<style>html { font-size: calc(100vw / 3.75); }...
From 2024-04-16 09:34:16
0
0
4687
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
|