-
Notifications
You must be signed in to change notification settings - Fork 105
/
Copy pathintro.xml
63 lines (62 loc) · 2.93 KB
/
intro.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: cf9fc93681ad1bd5dfaaf61282a0463c2531f7d5 Maintainer: Avenger Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<chapter xml:id="install.general" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>安装前需要考虑的事项</title>
<para>
安装前,首先需要知道想用 PHP 来做什么。PHP 主要用在两个领域,分别在 <link
linkend="intro-whatcando">PHP 能做什么</link> 一节中进行了描述:
<itemizedlist>
<listitem><simpara>网站和 web 应用程序(服务器端脚本)</simpara></listitem>
<listitem><simpara>命令行脚本</simpara></listitem>
</itemizedlist>
</para>
<para>
在通常情况下,需要三样东西:PHP
自身、一个 web 服务器和一个 web 浏览器。通常你已经拥有了一个 web
浏览器,并且在你使用的操作系统中,也可能已经内置了 web 服务器(例如 Linux 和 macOS 下的
Apache;Windows 下的 IIS)。也许在某个公司租用了 web
空间(虚拟主机、VPS 等),这样,自己无需设置任何东西,仅需要编写 PHP
脚本,并上传到租用的空间中,然后在浏览器中查看结果。
</para>
<para>
如果需要自己配置服务器和 PHP,有两个方法将 PHP 连接到服务器上。对于很多服务器,PHP
均有一个直接的模块接口(也叫做 SAPI)。这些服务器包括 Apache、Microsoft Internet
Information Server、Netscape 和 iPlanet 等服务器。如果你使用的 web 服务器不支持 PHP
模块接口,还可以将其作为 CGI 或 FastCGI 处理器来使用。这意味着可以使用 PHP
的 CGI 可执行程序来处理所有服务器上的 PHP 文件请求。
</para>
<para>
如果你对 PHP 命令行脚本感兴趣(例如在离线状态下,根据传递给脚本的参数,自动生成一些图片,或处理一些文本文件),可以参考
<link linkend="features.commandline">PHP 在命令行模式下的使用</link> 章节。在这种情况下,不再需要 web 服务器和 web 浏览器支持。
</para>
<para>
本节开始介绍如何在 Unix 和 Windows 的 web
服务器中配置服务器模块接口和 CGI 可执行程序。也将在下面几节中了解到有关命令行可执行程序安装的信息。
</para>
<para>
PHP 源代码包和二进制包可以在以下链接获取
<link xlink:href="&url.php.downloads;">&url.php.downloads;</link>。
</para>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->