Commit 004e8bf0 authored by hujun's avatar hujun

下载路径修改

parent 0452af13
...@@ -66,14 +66,21 @@ function download_file($archivo, $downloadfilename = null) { ...@@ -66,14 +66,21 @@ function download_file($archivo, $downloadfilename = null) {
* @param $url * @param $url
* @param $dir * @param $dir
* @param string $filename * @param string $filename
* @param $date
* @return bool|string * @return bool|string
*/ */
function down_file($url, $dir, $filename=''){ function down_file($url, $dir, $filename='', $date){
if(empty($url)){ if(empty($url)){
return false; return false;
} }
$date = date('Ymd');
if (empty($date)) {
$date = date('Ymd');
} else {
$date = date('Ymd', strtotime($date));
}
$ext = strrchr($url, '.'); $ext = strrchr($url, '.');
$dir = $dir.DS.$date; $dir = $dir.DS.$date;
......
...@@ -202,12 +202,18 @@ class PrivacyNumber ...@@ -202,12 +202,18 @@ class PrivacyNumber
$file_name = explode('/', $v['voice_file']); $file_name = explode('/', $v['voice_file']);
$file_name = $file_name[1]; $file_name = $file_name[1];
} }
$is_down = down_file($result_data->DownloadUrl, PHONE_VOICE, $file_name); $is_down = down_file($result_data->DownloadUrl, PHONE_VOICE, $file_name, $date);
} }
} elseif ($v['type'] == 2) { } elseif ($v['type'] == 2) {
/*容联云音频下载*/ /*容联云音频下载*/
if (!empty($v['mp3_url'])) { if (!empty($v['mp3_url'])) {
$is_down = down_file($v['mp3_url'], PHONE_VOICE); if ($param['record_down'] == 1) {
$file_name = basename($v['mp3_url']);
} else {
$file_name = explode('/', $v['voice_file']);
$file_name = $file_name[1];
}
$is_down = down_file($v['mp3_url'], PHONE_VOICE, $file_name, $date);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment