Skip to content

Commit

Permalink
Update tutorial.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
mowangjuanzi committed Nov 18, 2024
1 parent eb5d702 commit 1242ca0
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions chapters/tutorial.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 04d9aded7bbd447523cf038ddf88e6d7f7e43c53 Maintainer: HonestQiao Status: ready -->
<!-- EN-Revision: 1fd637525fd3bbaec04f6fff80eeb33fce880b10 Maintainer: HonestQiao Status: ready -->
<!-- CREDITS: Gregory, Luffy, mowangjuanzi -->
<chapter xml:id="tutorial" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<info><title>简明教程</title></info>
Expand Down Expand Up @@ -58,6 +58,26 @@
<info><title>第一个 PHP 脚本:<filename>hello.php</filename></title></info>
<programlisting role="php">
<![CDATA[
<?php
echo "Hello World!";
?>
]]>
</programlisting>
<simpara>
在浏览器的地址栏里输入 web 服务器的 URL
访问这个文件,在结尾加上“/hello.php”。如果本地开发,那么
URL 一般是 <literal>http://localhost/hello.php</literal> 或者
<literal>http://127.0.0.1/hello.php</literal>,当然这取决于
web 服务器的设置。如果所有的设置都正确,那么这个文件将被
PHP 解析,浏览器会显示输出的“Hello World”。
</simpara>
<simpara>
PHP 可以嵌入到普通 HTML 网页中。这意味着可以在 HTML 文档中编写 PHP 语句,如下例所示:
</simpara>
<programlisting role="php">
<![CDATA[
<!DOCTYPE html>
<html>
<head>
Expand All @@ -70,12 +90,7 @@
]]>
</programlisting>
<simpara>
在浏览器的地址栏里输入 web 服务器的 URL
访问这个文件,在结尾加上“/hello.php”。如果本地开发,那么这个
URL 一般是 <literal>http://localhost/hello.php</literal> 或者
<literal>http://127.0.0.1/hello.php</literal>,当然这取决于
web 服务器的设置。如果所有的设置都正确,那么这个文件将被
PHP 解析,浏览器中将会输出如下结果:
这会产生以下输出:
</simpara>
<screen role="html">
<![CDATA[
Expand Down

0 comments on commit 1242ca0

Please sign in to comment.