Is there a way to kill a Windows process, say calc.exe
, with PHP without using exec
?
exec
calls an external program, I try to avoid using that command unless necessary.
There is.
Use the W32api
PHP extension, which provides access to the Win32 API - then use the TerminateProcess()
API after aquiring a handle to the process.
PS
On this way you are able to make PHP able work with __asm { } insertions/add some kernel code , if you want it...
No, there isn't. PHP has little access to the system except through exec
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.