mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
open_basedir로 제한되어 있는 경우 ffmpeg 기능을 사용할 수 없는 문제 수정
This commit is contained in:
parent
ca8204a4c0
commit
c10e4c082b
1 changed files with 16 additions and 1 deletions
|
|
@ -152,7 +152,22 @@ class Storage
|
|||
public static function isExecutable($path)
|
||||
{
|
||||
$path = rtrim($path, '/\\');
|
||||
return @self::exists($path) && @is_executable($path);
|
||||
if (function_exists('exec'))
|
||||
{
|
||||
@exec('/bin/ls -l ' . escapeshellarg($path), $output, $return_var);
|
||||
if ($return_var === 0)
|
||||
{
|
||||
return preg_match('@^[a-z-]{9}x@', array_pop($output)) === 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return @self::exists($path) && @is_executable($path);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue