Open browser on server after receiving url from client

时间:2016-04-04 17:29:38

标签: php server raspberry-pi webpage epiphany

Using a Raspberry Pi, I have created a web-server.

End goal: The web-page prompts the user for the URL, the URL is sent from the client to the server, and the URL is opened in the Raspberry Pi's browser: Epiphany.

As of now, I have a basic form for the URL on the web-page, and once the submit button is pressed, the server uses PHP to read the input.

How can I open a webpage on the server, Raspberry Pi, with that URL?

Update: Forgot to mention, the Raspberry Pi is running Raspbian.

1 个答案:

答案 0 :(得分:0)

这听起来像X11显示问题。

使用shell_exec,让您的网络服务器显示DISPLAY环境变量的值。如果没有设置,你需要设置它(可能是:1.0)。

您可能还需要使用xhost +向root用户授予权限(假设Web服务器以root用户身份运行)。