mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
is_command() 대체
This commit is contained in:
parent
9a78f0f0a0
commit
77122a32b2
6 changed files with 18 additions and 25 deletions
|
|
@ -691,23 +691,4 @@ function is_empty_html_content($str)
|
|||
$str = strip_tags($str, '<img><audio><video><iframe><object><embed>');
|
||||
$str = utf8_trim(utf8_clean(html_entity_decode($str, ENT_QUOTES, 'UTF-8')));
|
||||
return $str === '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a external program can be executed.
|
||||
*
|
||||
* @param string $command
|
||||
* @return bool
|
||||
*/
|
||||
function is_command($command)
|
||||
{
|
||||
if ($command && function_exists('exec'))
|
||||
{
|
||||
@exec('ls ' . escapeshellarg($command), $output, $return_var);
|
||||
return $return_var === 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue