Comments (3)
历尽千辛万苦才跳过了这个坑(win的路径全都要重新弄,并且swoole版本的php是用的Cygwin,路径要用/cygdrive/d/web/ 这样的格式)
另外swoole版本的php 执行shell_exec始终不成功,就换了个获取音乐长度的方案,用 getid3 (https://sourceforge.net/projects/getid3/) 替换了用python的方案。
from syncmusic.
Windows 下可以使用 proc_open 替代 shell_exec 函数
function win_exec($command) {
$descriptorspec = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
2 => array("pipe", "r")
);
$process = proc_open($command, $descriptorspec, $pipes);
$result = "";
if (is_resource($process)) {
while(!feof($pipes[1])) {
$resule .= fread($pipes[0], 8192);
$resule .= fread($pipes[1], 8192);
$resule .= fread($pipes[2], 8192);
}
fclose($pipes[1]);
fclose($pipes[0]);
fclose($pipes[2]);
}
return $result;
}
另外可以尝试使用 WSL 子系统来运行
from syncmusic.
谢谢大佬 这个问题应该可以关了,我还有其它的问题,重新开一个
from syncmusic.
Related Issues (20)
- 正在播放 Loading...歌词 Loading... HOT 7
- 我自己加了咪咕的源,解锁了周董,啊哈哈~~ HOT 3
- 手机端无法播放音乐 HOT 1
- 没有歌曲播放时候可以播放自己的歌单吗? HOT 1
- 如何修改主题色啊awa HOT 1
- 服务器可以正常缓存音乐,但是不会添加到播放列表中 HOT 1
- 请问 房管一系列的配置在哪里设置www HOT 2
- Akariin HOT 1
- 多个BUG 无法搜索歌曲/无法获取IP/指令失效
- akariin
- gll
- php server.php启动报错 HOT 3
- 如何在宝塔面板安装? HOT 5
- 切歌时php报错
- 歌曲下载失败,错误代码:ERROR_TIME0
- MKOnlineMusicPlayer 返回MP3格式 HOT 3
- 点歌报错 HOT 3
- 播放故障 HOT 1
- 播放不了
- Search.php文件被浏览器拦截 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from syncmusic.