음성 캡챠 파일 삭제 코드 변경
This commit is contained in:
1 parent
18e09702f3
commit
634d85c763
2 files changed
+9
-2
No files matched your search
@@ -26,11 +26,11 @@ function make_mp3()
|
||||
|
||||
file_put_contents(G5_PATH.'/'.$mp3_file, $contents);
|
||||
|
||||
// 지난 캡챠 파일 삭제 (100번중에 한번만 실행)
|
||||
// 지난 캡챠 파일 삭제
|
||||
if (rand(0,99) == 0) {
|
||||
foreach (glob(G5_PATH.'/data/cache/kcaptcha-*.mp3') as $file) {
|
||||
if (filemtime($file) + 86400 < G5_SERVER_TIME) {
|
||||
unset($file);
|
||||
@unlink($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user