File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
- function sae_copy_defaut_app ($ directory ,$ to ) {
2
+ function copy_defaut_app ($ directory ,$ to ) {
3
3
if (!is_dir ($ to )){
4
4
mkdir ($ to );
5
5
}
6
6
$ handle = opendir ($ directory );
7
7
while (($ file = readdir ($ handle )) !== false ) {
8
- if ($ file != ". " && $ file != ".. " ) {
9
- is_dir ("$ directory/ $ file " ) ?sae_copy_defaut_app ("$ directory/ $ file " ,"$ to/ $ file " ) :copy ("$ directory/ $ file " ,"$ to/ $ file " );
8
+ if ($ file != '. ' && $ file != '.. ' ) {
9
+ if (is_file ($ to .'/ ' .$ file )) continue ;
10
+ is_dir ($ directory .'/ ' .$ file ) ?copy_defaut_app ($ directory .'/ ' .$ file ,$ to .'/ ' .$ file ) :copy ($ directory .'/ ' .$ file ,$ to .'/ ' .$ file );
10
11
}
11
12
}
12
13
if (readdir ($ handle ) == false ) {
@@ -18,4 +19,4 @@ function sae_copy_defaut_app($directory,$to) {
18
19
header ("Content-Type:text/html;charset=utf-8 " );
19
20
exit ('项目目录不可写,请手动建立项目目录,并设在为可写 ' );
20
21
}
21
- sae_copy_defaut_app (SAE_PATH .'DefaultApp/ ' ,APP_PATH );
22
+ copy_defaut_app (SAE_PATH .'DefaultApp/ ' ,APP_PATH );
You can’t perform that action at this time.
0 commit comments