wavs 디렉토리 절대경로에서 상대경로로 변경
This commit is contained in:
@ -2,8 +2,8 @@
|
||||
include_once("./_common.php");
|
||||
|
||||
// prepare an array of wavfiles
|
||||
$lc ='/home/tmp/g4s/plugin/captcha/wavs/';
|
||||
$wav = $lc.'captcha.wav';
|
||||
$wavs_dir = $g4['path'].'/plugin/captcha/wavs/';
|
||||
$wav = $wavs_dir.'0.wav';
|
||||
|
||||
$fields = join('/',array( 'H8ChunkID', 'VChunkSize', 'H8Format',
|
||||
'H8Subchunk1ID', 'VSubchunk1Size',
|
||||
|
||||
@ -2,25 +2,14 @@
|
||||
include_once("./_common.php");
|
||||
|
||||
// prepare an array of wavfiles
|
||||
$lc ='/home/tmp/g4s/plugin/captcha/wavs/';
|
||||
$wavs_dir = $g4['path'].'/plugin/captcha/wavs/';
|
||||
$number = (string)$_SESSION['ss_captcha_key'];
|
||||
$wavs = array();
|
||||
for($i=0;$i<strlen($number);$i++){
|
||||
$file = $lc.$number[$i].'.wav';
|
||||
//echo $file;
|
||||
if(!@file_exists($file)) {
|
||||
$file = $en.$code{$i}.'.wav';
|
||||
}
|
||||
$file = $wavs_dir.$number[$i].'.wav';
|
||||
$wavs[] = $file;
|
||||
/*
|
||||
for ($d=0;$d<rand(0,5);$d++) {
|
||||
$wavs[] = $lc.'delay'.rand(0,1).'.wav';
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
//print_r($wavs); exit;
|
||||
|
||||
header('Content-type: audio/x-wav');
|
||||
header('Content-Disposition: attachment;filename=captcha.wav');
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user