开发者

system() and shell_exec() methods

开发者 https://www.devze.com 2023-03-15 18:12 出处:网络
I am working with a WAMP installation (on Windows). Do the methods 开发者_如何学编程system() and shell_exec() only work on Linux machine or are they available on Windows, too? I am trying these method

I am working with a WAMP installation (on Windows). Do the methods 开发者_如何学编程system() and shell_exec() only work on Linux machine or are they available on Windows, too? I am trying these methods in Windows but nothing is working.


As you can see in the documentation for system and shell_exec, both are supported on all platforms php runs on (otherwise there'd be a notice).


Both functions work on Windows, but there is another security restriction - you need to disable safe_mode first. You can do this in your php.ini file.


For questions like that the first thing you should of done was look up the documentation found here, where you will find that it doesn't explicitly say its Linux only. The issue you could be having is PHP is in safemode or you need to add rights to CMD for the account php uses.

0

精彩评论

暂无评论...
验证码 换一张
取 消