chore: Проверки к типам
This commit is contained in:
parent
5d3fae4249
commit
8786e84568
12 changed files with 41 additions and 47 deletions
|
|
@ -33,7 +33,11 @@ function str_getcsv($input, $delimiter = ",", $enclosure = '"', $escape = "\\")
|
|||
function process_exists($pid)
|
||||
{
|
||||
if (PHP_OS == 'WINNT') {
|
||||
$processes = explode("\n", shell_exec("tasklist.exe /NH /FO CSV"));
|
||||
$content = shell_exec("tasklist.exe /NH /FO CSV");
|
||||
if (!$content) {
|
||||
return false;
|
||||
}
|
||||
$processes = explode("\n", $content);
|
||||
foreach ($processes as $process) {
|
||||
if ($process != "") {
|
||||
$csv = str_getcsv($process);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue