File tree Expand file tree Collapse file tree 1 file changed +22
-7
lines changed Expand file tree Collapse file tree 1 file changed +22
-7
lines changed Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
2
<!-- $Revision$ -->
3
- <!-- EN-Revision: 04d9aded7bbd447523cf038ddf88e6d7f7e43c53 Maintainer: HonestQiao Status: ready -->
3
+ <!-- EN-Revision: 1fd637525fd3bbaec04f6fff80eeb33fce880b10 Maintainer: HonestQiao Status: ready -->
4
4
<!-- CREDITS: Gregory, Luffy, mowangjuanzi -->
5
5
<chapter xml : id =" tutorial" xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
6
6
<info ><title >简明教程</title ></info >
58
58
<info ><title >第一个 PHP 脚本:<filename >hello.php</filename ></title ></info >
59
59
<programlisting role =" php" >
60
60
<![CDATA[
61
+ <?php
62
+
63
+ echo "Hello World!";
64
+
65
+ ?>
66
+ ]]>
67
+ </programlisting >
68
+ <simpara >
69
+ 在浏览器的地址栏里输入 web 服务器的 URL
70
+ 访问这个文件,在结尾加上“/hello.php”。如果本地开发,那么
71
+ URL 一般是 <literal >http://localhost/hello.php</literal > 或者
72
+ <literal >http://127.0.0.1/hello.php</literal >,当然这取决于
73
+ web 服务器的设置。如果所有的设置都正确,那么这个文件将被
74
+ PHP 解析,浏览器会显示输出的“Hello World”。
75
+ </simpara >
76
+ <simpara >
77
+ PHP 可以嵌入到普通 HTML 网页中。这意味着可以在 HTML 文档中编写 PHP 语句,如下例所示:
78
+ </simpara >
79
+ <programlisting role =" php" >
80
+ <![CDATA[
61
81
<!DOCTYPE html>
62
82
<html>
63
83
<head>
70
90
]]>
71
91
</programlisting >
72
92
<simpara >
73
- 在浏览器的地址栏里输入 web 服务器的 URL
74
- 访问这个文件,在结尾加上“/hello.php”。如果本地开发,那么这个
75
- URL 一般是 <literal >http://localhost/hello.php</literal > 或者
76
- <literal >http://127.0.0.1/hello.php</literal >,当然这取决于
77
- web 服务器的设置。如果所有的设置都正确,那么这个文件将被
78
- PHP 解析,浏览器中将会输出如下结果:
93
+ 这会产生以下输出:
79
94
</simpara >
80
95
<screen role =" html" >
81
96
<![CDATA[
You can’t perform that action at this time.
0 commit comments