linux下:
编辑
/etc/sudoers 文件
//添加执行php的用户
lighttpd ALL=(ALL) NOPASSWD:ALL #web(php执行) 用户
$parameter = '/usr/bin/sudo test.sh';
$res = exec($parameter,$arr);
linux下:
编辑
/etc/sudoers 文件
//添加执行php的用户
lighttpd ALL=(ALL) NOPASSWD:ALL #web(php执行) 用户
$parameter = '/usr/bin/sudo test.sh';
$res = exec($parameter,$arr);