File: basic-syntax.xml

package info (click to toggle)
phpdoc 20020310-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 35,272 kB
  • ctags: 354
  • sloc: xml: 799,767; php: 1,395; cpp: 500; makefile: 200; sh: 140; awk: 51
file content (128 lines) | stat: -rw-r--r-- 3,781 bytes parent folder | download
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?xml version="1.0" encoding="big5"?>
  <chapter id="language.basic-syntax">
   <title>򥻥yk</title>

   <sect1 id="language.basic-syntax.phpmode">
    <title>iJ PHP yҦ</title>
  
    <para>
     b HTML 󤤴J PHP O@|ؤk: </para>

    <para>
     <example>
      <title>Ways of escaping from HTML</title>
      <programlisting>
1.  &lt;? echo ("this is the simplest, an SGML processing instruction\n"); ?&gt;
 
2.  &lt;?php echo("if you want to serve XHTML or XML documents, do like this\n"); ?&gt;

3.  &lt;script language="php"&gt; 
        echo ("some editors (like FrontPage) don't
              like processing instructions");
    &lt;/script&gt;

4.  &lt;% echo ("You may optionally use ASP-style tags"); %&gt;
    &lt;%= $variable; # This is a shortcut for "&lt;%echo .." %&gt;
      </programlisting>
     </example>
    </para>

    <para>
     WCXkĤ@إu PHP Q]w "u" ɤ~|ġC ]wkiH
     <!-- via the <function>short_tags</function> function,-->bճ] PHP.INI 
     <link linkend="ini.short-open-tag">short_open_tag</link>
     ]uȡA Ϊ̦bsĶ PHP ɰ    <command>configure</command>
ɥ[J --enable-short-tags oӿﶵC
    </para>

    <para>
     The second way is the generally preferred method, as it allows for the
     next generation of XHTML to be easily implemented with PHP.
    </para>

    <para>
     ĥ|ؤk]u ASP κA Q\ɤ~ġC oݭnճ] 
<link linkend="ini.asp-tags">asp_tags</link>
oӰѼơC 

    <note>
     <para> ASP-style Ҫ䴩q PHP  3.0.4 }l.</para>
    </note></para>

    <para>
{qаON|]AHb᪺ŸC (pŸܡC) 
</para></sect1>

   <sect1 id="language.basic-syntax.instruction-separation">
    <title>jO</title>

    <simpara>
    PHP UO椧jkM CB PERL O@˪C - COΤ ";" }C </simpara>

    <para>
     ѩ{qҦP˥NOA ]HUq{OĪGO@˪C 
     <informalexample>
      <programlisting>
&lt;?php
    echo "This is a test";
?>

&lt;?php echo "This is a test" ?>
      </programlisting>
     </informalexample></para></sect1>

   <sect1 id="language.basic-syntax.comments">
    <title>[`k</title>
   
    <para>
     PHP WiH CB C++B M Unix shell `kC b`eNQ PHP C p : 

    <informalexample><programlisting>
&lt;?php
    echo "This is a test"; // This is a one-line c++ style comment
    /* This is a multi line comment
       yet another line of comment */
    echo "This is yet another test";
    echo "One Final Test"; # This is shell-style style comment
?>
     </programlisting>
    </informalexample></para>

    <simpara>
    ܩ󨺺إu`Ѥ@檺`Ÿ@νdu|b椺ġC ( p椤PɥX{ PHP {FqŸ "?>" hbŸ᪺rN|QC)</simpara>
    <informalexample><programlisting>
&lt;h1>This is an &lt;?php # echo "simple";?> example.&lt;/h1>
&lt;p>The header above will say 'This is an example'.
</programlisting></informalexample> 

    <simpara>
pGO C 榡Ӱ`A `NnUүb`A[`A _h|y~C

</simpara>

    <informalexample><programlisting>
&lt;?php
 /* 
    echo "This is a test"; /* This comment will cause a problem */
 */
?>
    </programlisting></informalexample></sect1>
  </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:"../manual.ced"
 sgml-exposed-tags:nil
 sgml-local-catalogs:nil
 sgml-local-ecat-files:nil
 End:
 -->