如何从远程服务器上预览浏览器上的PHP文件?

发布于 2025-02-03 11:22:36 字数 251 浏览 3 评论 0原文

我在'somedomain.cloudapp.azure.com'上有一个远程服务器,并且在该服务器上有一个命名的PHP文件。

我想在浏览器上预览“ index.php”文件以查看输出。我曾经打开文件并通过终端进行了编辑,但是现在我想查看PHP文件的输出。

我从Localhost中知道,我刚刚放置了浏览器URL localhost,并且它预览了index.php,如何对远程服务器上的文件进行操作?

I have a remote server on 'somedomain.cloudapp.azure.com' and I have a php file named on that server.

I would like to preview the 'index.php' file on browser to see the output. I used to open the files and edited it through terminal, but now I want to see the output of the php file.

I know from localhost I just put on the browser URL localhost and it preview the index.php, how to do that for a file that is on remote server?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

长发绾君心 2025-02-10 11:22:36

您需要多件事才能查看您在自己的服务器上运行的网页上的结果;像该Web服务器(例如Engine Nginx或Apache,PHP-CLI)一样,如果使用数据库,则需要phpmysql,并且依赖关系。

You need multiple thing to see your result on the web page running on the own server ; like that web server such as engine nginx or apache , php-cli , if you using database you need phpMySql and there dependencies.

梦幻的心爱 2025-02-10 11:22:36

PHP是超文本预处理器。

php二进制可执行文件位于“服务器”上,例如,与Apache HTTP服务器(也在服务器上运行的Apache HTTP服务器)或“服务器端”(因此,“服务器端脚本语言”)一起运行。

为了使您的浏览器渲染一个php文件,因为它被假定为“预处理” html;由PHP二进制处理以渲染为HTML(在服务器上)处理的PHP代码,在您的服务器上运行的“堆栈”(HTTP Server软件等)实际上是具有这样的PHP二进制配置,可以与Apache的请求进行通信。

PHP is a hypertext preprocessor .

The PHP binary executable resides on the "server" E.g. to function with other files served by the Apache HTTP server, also running on the server, or "server-side" (hence the term, "Server Side Scripting Language").

For your browser to render a PHP file as-- it is presumed-- the "pre-processed" HTML; the PHP code as processed by the PHP binary for rendering as HTML (on the server), it is necessary that the "stack" (HTTP server software, etc.) running on your server does in fact have such a PHP binary configured to communicate with requests from Apache.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文