通过php代码启动浏览器[关闭]

Is it possible to invoke the browser via php code ?

Thank you in advance.

PHP is processed by the Web server. The browser is a client application on a client machine. The server cannot launch a client application without having a helper application in place and running on the client machine. Any other architecture would be very bad from a security standpoint - the client machine would have no control over who could run an application on their machine.

if you use firefox, you can use this:

pclose(popen('firefox -url http://www.example.com/reader.php?code=12345 &', 'r'));

other browsers have different console arguments, so you can try it yourself.