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.
答案 0 :(得分:0)
这听起来像X11显示问题。
使用shell_exec
,让您的网络服务器显示DISPLAY
环境变量的值。如果没有设置,你需要设置它(可能是:1.0
)。
您可能还需要使用xhost +
向root用户授予权限(假设Web服务器以root用户身份运行)。