I'm trying to write a script to restart my wamp server with the click of a button. I am trying to use

exec("c:\\\\wamp\wampmanager.exe -restart");

to run the command. Seems to be not working. I have used system(), and passthru(); functions to get the results I am looking for but got null results. Could anyone point me in the right direction?

I haven't really tried this myself, but I have a few ideas.

$return = system('c:/wamp/wampmanager.exe -restart');

Note sure if it will work, I can't actually test it as I don't use WAMP (anymore).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.