在服务器上安装PHP是什么意思?

发布于 2024-08-11 20:35:39 字数 536 浏览 7 评论 0原文

此处 在 PHP 教程中我读到:

如果您的服务器支持 PHP,则您不支持 需要做任何事情。

只需在您的文件中创建一些 .php 文件 web 目录,服务器将 为你解析它们。因为它是 免费,大多数网络主机都提供 PHP 支持。

但是,如果您的服务器没有 支持PHP,必须安装PHP。

  1. 首先,我不太清楚这里的“安装 PHP”是什么意思。 (如何安装编程语言?)

  2. 其次,这是否意味着我可以到任何免费主机,甚至是不支持 PHP 的主机,在其上“安装 PHP”,它将开始执行所有 PHP 操作给我的任务?

Here in the tutorial on PHP I read:

If your server supports PHP you don't
need to do anything.

Just create some .php files in your
web directory, and the server will
parse them for you. Because it is
free, most web hosts offer PHP
support.

However, if your server does not
support PHP, you must install PHP.

  1. Firstly, I am not quite sure what it means to "install PHP" here. (How can a programming language be installed?)

  2. Secondly, does this mean that I can go to any free host, even a host that doesn't support PHP, "install PHP" on it and it will start doing all PHP tasks for me?

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

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

发布评论

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

评论(4

扶醉桌前 2024-08-18 20:35:39

网络服务器不知道如何处理 PHP 文件,因此您必须告诉它将这些请求定向到 PHP 解释器,您需要单独安装该解释器。

您的网络主机需要安装此功能,这不是您可以在共享网络主机上自行完成的操作。

您可以在这里找到更多信息:

https://www.php.net/manual /en/intro-whatcando.php

The webservers doesn't know what to do with PHP files, therefore you have to tell it to direct those requests to the PHP interpreter, which you need to install seperately.

Your webhost needs to have this installed, it's not something you can do yourself on a shared webhost.

You can find more information here:

https://www.php.net/manual/en/intro-whatcando.php

送你一个梦 2024-08-18 20:35:39

安装编程语言与安装其他软件相同。区别在于安装的位置。
通常共享托管服务器已安装它,如果没有,您可能无法自己安装。因此,由于有很多选项,您可以选择一个有的选项。

例如,如果您想将其安装在允许的地方(您的计算机:),则有不同的选项

1) Windows - 下载二进制文件并单击并安装。
2) *Nix - 自动安装 - 使用一些包管理器工具,如 yum 或 apt-get 来安装已经为您准备好的二进制文件
3) *Nix - 通过您正在运行的系统上提供的 make 工具自行构建它。

我从未在 Windows 上编译和构建过它,所以我不知道它是如何工作的;)

源代码和二进制文件在这里 - http://www.php.net/downloads.php

您可以在此处找到有关安装和配置 php 的更多信息http://php.net/manual/en/install.php

Installing a programming language is the same as installing other software. The difference is the place where you install it.
Usually shared hosting servers have it installed and if they don't you probably can not do that by yourself. So, since there is a lot of options you can choose one that has.

If you, for example, want to install it somewhere where you are allowed to (your machine :) there are different options

1) Windows - download binary and click and install.
2) *Nix - automatic installation - use some package manager tool like yum or apt-get to install binaries that are already prepared for you
3) *Nix - build it by yourself by make tools provided on the system you are running.

I have never compiled and built it on windows so I don't know how it works there ;)

Source and binaries are here - http://www.php.net/downloads.php

You can find more info about installing and configuring php here http://php.net/manual/en/install.php

梦与时光遇 2024-08-18 20:35:39
  1. PHP 安装意味着手动编译源代码(如果您在服务器上设置自定义 PHP,则很常见),或者更实际的是下载诸如 php5php5-common 之类的包 以及相关的软件包,使用诸如 yumapt-get 之类的工具(至少在 Linux 上)。

  2. 您无法在免费的共享主机上安装 PHP,您可以在您具有 root 访问权限的服务器上安装 PHP,例如专用服务器或 VPS 服务器。

  1. PHP Installing means either manually compiling the source code ( common if you're setting up a customized PHP on the server ), or more practically downloading packages such as php5, php5-common and related packages with a tool such as yum or apt-get ( at least on Linux ).

  2. You can't install PHP on a free shared host, you can install PHP on a server that you have root access to, such as a dedicated or VPS server.

‖放下 2024-08-18 20:35:39
  1. 是的,可以安装编程语言(或者更准确地说,可以安装用于编译/解释语言的支持文件)。在 Linux 机器上,安装 Apache & PHP 通过 apt-get (Ubuntu) 或 yum (Fedora) 完成。

    在 Windows 计算机上,您可以获得 Apache& PHP 设置非常简单:只需获取 WAMP

  2. 不,您不能访问任何“免费主机”并期望按照您的意愿安装内容。通常一分钱一分货:免费托管 ->自由度较低。

  1. Yes a programming language can be installed (or more precisely, the support files for compiling/interpreting a language are). On Linux machine, installing Apache & PHP is done through either apt-get (Ubuntu) or yum (Fedora).

    On Windows machines, you can get a Apache& PHP setup quite easily: just grab WAMP.

  2. No you cannot go to any "free host" and expect to install stuff as you wish. Usually you get what you pay for: free hosting -> less degrees of liberty.

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