跳过转换步骤

发布于 2024-09-15 19:22:11 字数 374 浏览 4 评论 0原文

所以我的 php 文件中有一个脚本,它接受 .wav 文件并将其转换为 .mp3

exec( "lame ".SOMELOCATION."/".$file.".wav  ".LOCATION."/{$Sub}/".$file.".mp3 ");

我现在需要从 url 获取该文件并将其保存到上面列出的位置

例如:

它将像这样输入

 http://someurl.com/audio/something.mp3 

并且我需要将该 mp3 下载并保存在

LOCATION."/{$Sub}/".$file.".mp3 

So i have a script in my php file that takes a .wav file and converts it to a .mp3

exec( "lame ".SOMELOCATION."/".$file.".wav  ".LOCATION."/{$Sub}/".$file.".mp3 ");

I now need to take the file from the url and save it to the location listed above

For example:

it will come in like this

 http://someurl.com/audio/something.mp3 

and i need to take that mp3 and download it and save it in

LOCATION."/{$Sub}/".$file.".mp3 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

人间☆小暴躁 2024-09-22 19:22:11

从 URL 中获取子目录:`http://example.com/?Sub=subdir

if (!isset($_GET['Sub']) || is_array($_GET['Sub']) ||
        !preg_match('/[a-z0-9]/i', $_GET['Sub']))
    die("invalid subdirectory");

exec( "lame ".SOMELOCATION."/".$file.".wav  ".
    LOCATION."/{$_GET['Sub']}/".$file.".mp3 ");

Take the subdirectory from the URL: `http://example.com/?Sub=subdir

if (!isset($_GET['Sub']) || is_array($_GET['Sub']) ||
        !preg_match('/[a-z0-9]/i', $_GET['Sub']))
    die("invalid subdirectory");

exec( "lame ".SOMELOCATION."/".$file.".wav  ".
    LOCATION."/{$_GET['Sub']}/".$file.".mp3 ");
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文