How does PHP copy and move the specified file to another directory?

ask, how does PHP move"a directory / b directory / specified file .txt"to"c directory / d directory / specified file .txt"?

Php
Mar.01,2021

<?php
$src = 'a/b/.txt';
$dst = 'c/d/.txt';
// mkdir()c/d
mkdir(dirname($dst), 0777, true);
// 
rename($src, $dst);
Menu