A small code snippet, which is very common yet useful. Let’s write a function which will copy a folder/directory and its contents (including subfolders, files) from one place to other.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public static function copyFolder($source,$dest) { // recursive function
if(is_dir( $source)) { // if its directory
[…]





