mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
open_basedir로 제한되어 있는 경우 ffmpeg 기능을 사용할 수 없는 문제 수정
This commit is contained in:
parent
ca8204a4c0
commit
c10e4c082b
1 changed files with 16 additions and 1 deletions
|
|
@ -152,8 +152,23 @@ class Storage
|
||||||
public static function isExecutable($path)
|
public static function isExecutable($path)
|
||||||
{
|
{
|
||||||
$path = rtrim($path, '/\\');
|
$path = rtrim($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);
|
return @self::exists($path) && @is_executable($path);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the size of a file.
|
* Get the size of a file.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue