Instead of writing the $pidfile to a file, how can I access it in the PHP script? Can I access it as a variable instead of writing the result to a file?
exec(sprintf("%s > %s 2>&1 & echo $! >> %s", $cmd, $outputfile, $pidfile));
From novice to tech pro — start learning today.