3 ms·
escapeshellarg is an ugly hack, php is passing everything through `sh -c` for no reason. The pcntl_exec function is the only one that has a reasonable interfac
by kpcyrd 7y ago
escapeshellarg is an ugly hack, php is passing everything through `sh -c` for no reason.
The pcntl_exec function is the only one that has a reasonable interface, but is way too low level.
php should simply accept this as a valid function call:
exec(["sudo", "pihole", "-a", "addstaticdhcp", $mac, $ip, $hostname]);